porkadot 0.18.1 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/hack/gen-storage-version-migrator.sh +7 -0
  3. data/hack/storage-version-migrator/kustomization.yaml +77 -0
  4. data/lib/porkadot/assets/bootstrap/manifests/kube-apiserver.bootstrap.yaml.erb +4 -30
  5. data/lib/porkadot/assets/bootstrap/manifests/kube-controller-manager.bootstrap.yaml.erb +13 -16
  6. data/lib/porkadot/assets/bootstrap/manifests/kube-proxy.bootstrap.yaml.erb +3 -2
  7. data/lib/porkadot/assets/bootstrap/manifests/kube-scheduler.bootstrap.yaml.erb +3 -5
  8. data/lib/porkadot/assets/kubelet.rb +1 -0
  9. data/lib/porkadot/assets/kubelet/config.yaml.erb +1 -0
  10. data/lib/porkadot/assets/kubelet/install-pkgs.sh.erb +10 -1
  11. data/lib/porkadot/assets/kubelet/kubelet.service.erb +3 -1
  12. data/lib/porkadot/assets/kubelet/setup-containerd.sh.erb +10 -0
  13. data/lib/porkadot/assets/kubernetes.rb +3 -1
  14. data/lib/porkadot/assets/kubernetes/kubeconfig.yaml.erb +19 -0
  15. data/lib/porkadot/assets/kubernetes/manifests/000-metallb.yaml.erb +7 -0
  16. data/lib/porkadot/assets/kubernetes/manifests/coredns.yaml.erb +8 -1
  17. data/lib/porkadot/assets/kubernetes/manifests/flannel.yaml.erb +52 -431
  18. data/lib/porkadot/assets/kubernetes/manifests/kube-apiserver.secrets.yaml.erb +1 -0
  19. data/lib/porkadot/assets/kubernetes/manifests/kubelet-rubber-stamp.yaml.erb +1 -1
  20. data/lib/porkadot/assets/kubernetes/manifests/metallb.config.yaml.erb +13 -0
  21. data/lib/porkadot/assets/kubernetes/manifests/metallb.yaml.erb +71 -41
  22. data/lib/porkadot/assets/kubernetes/manifests/storage-version-migrator.yaml.erb +258 -228
  23. data/lib/porkadot/cmd/cli.rb +16 -0
  24. data/lib/porkadot/cmd/render/certs.rb +1 -1
  25. data/lib/porkadot/configs/kubernetes.rb +31 -1
  26. data/lib/porkadot/default.yaml +3 -3
  27. data/lib/porkadot/install/kubelet.rb +24 -0
  28. data/lib/porkadot/install/kubernetes.rb +2 -1
  29. data/lib/porkadot/version.rb +1 -1
  30. metadata +8 -3
  31. data/lib/porkadot/assets/kubernetes/manifests/pod-checkpointer.yaml.erb +0 -130
@@ -11,6 +11,7 @@ data:
11
11
  kubelet-client.crt: <%= certs.kubernetes.to_base64(:kubelet_client_cert) %>
12
12
  kubelet-client.key: <%= certs.kubernetes.to_base64(:kubelet_client_key) %>
13
13
  sa.pub: <%= certs.kubernetes.to_base64(:sa_public_key) %>
14
+ sa.key: <%= certs.kubernetes.to_base64(:sa_private_key) %>
14
15
  kind: Secret
15
16
  metadata:
16
17
  name: kube-apiserver
@@ -51,7 +51,7 @@ roleRef:
51
51
  name: kubelet-rubber-stamp
52
52
  apiGroup: rbac.authorization.k8s.io
53
53
  ---
54
- apiVersion: rbac.authorization.k8s.io/v1beta1
54
+ apiVersion: rbac.authorization.k8s.io/v1
55
55
  kind: ClusterRole
56
56
  metadata:
57
57
  name: kubelet-rubber-stamp
@@ -0,0 +1,13 @@
1
+ <% k8s = global_config.k8s -%>
2
+ ---
3
+ apiVersion: v1
4
+ kind: ConfigMap
5
+ metadata:
6
+ labels:
7
+ app: metallb
8
+ name: config
9
+ namespace: metallb-system
10
+ data:
11
+ config: |
12
+ <%= u.indent(global_config.lb.lb_config, 4) %>
13
+
@@ -1,11 +1,3 @@
1
- <% k8s = global_config.k8s -%>
2
- apiVersion: v1
3
- kind: Namespace
4
- metadata:
5
- labels:
6
- app: metallb
7
- name: metallb-system
8
- ---
9
1
  apiVersion: policy/v1beta1
10
2
  kind: PodSecurityPolicy
11
3
  metadata:
@@ -58,9 +50,7 @@ metadata:
58
50
  spec:
59
51
  allowPrivilegeEscalation: false
60
52
  allowedCapabilities:
61
- - NET_ADMIN
62
53
  - NET_RAW
63
- - SYS_ADMIN
64
54
  allowedHostPaths: []
65
55
  defaultAddCapabilities: []
66
56
  defaultAllowPrivilegeEscalation: false
@@ -72,6 +62,8 @@ spec:
72
62
  hostPorts:
73
63
  - max: 7472
74
64
  min: 7472
65
+ - max: 7946
66
+ min: 7946
75
67
  privileged: true
76
68
  readOnlyRootFilesystem: true
77
69
  requiredDropCapabilities:
@@ -118,7 +110,6 @@ rules:
118
110
  - get
119
111
  - list
120
112
  - watch
121
- - update
122
113
  - apiGroups:
123
114
  - ''
124
115
  resources:
@@ -158,6 +149,13 @@ rules:
158
149
  - get
159
150
  - list
160
151
  - watch
152
+ - apiGroups: ["discovery.k8s.io"]
153
+ resources:
154
+ - endpointslices
155
+ verbs:
156
+ - get
157
+ - list
158
+ - watch
161
159
  - apiGroups:
162
160
  - ''
163
161
  resources:
@@ -207,6 +205,37 @@ rules:
207
205
  - list
208
206
  ---
209
207
  apiVersion: rbac.authorization.k8s.io/v1
208
+ kind: Role
209
+ metadata:
210
+ labels:
211
+ app: metallb
212
+ name: controller
213
+ namespace: metallb-system
214
+ rules:
215
+ - apiGroups:
216
+ - ''
217
+ resources:
218
+ - secrets
219
+ verbs:
220
+ - create
221
+ - apiGroups:
222
+ - ''
223
+ resources:
224
+ - secrets
225
+ resourceNames:
226
+ - memberlist
227
+ verbs:
228
+ - list
229
+ - apiGroups:
230
+ - apps
231
+ resources:
232
+ - deployments
233
+ resourceNames:
234
+ - controller
235
+ verbs:
236
+ - get
237
+ ---
238
+ apiVersion: rbac.authorization.k8s.io/v1
210
239
  kind: ClusterRoleBinding
211
240
  metadata:
212
241
  labels:
@@ -268,6 +297,21 @@ subjects:
268
297
  - kind: ServiceAccount
269
298
  name: speaker
270
299
  ---
300
+ apiVersion: rbac.authorization.k8s.io/v1
301
+ kind: RoleBinding
302
+ metadata:
303
+ labels:
304
+ app: metallb
305
+ name: controller
306
+ namespace: metallb-system
307
+ roleRef:
308
+ apiGroup: rbac.authorization.k8s.io
309
+ kind: Role
310
+ name: controller
311
+ subjects:
312
+ - kind: ServiceAccount
313
+ name: controller
314
+ ---
271
315
  apiVersion: apps/v1
272
316
  kind: DaemonSet
273
317
  metadata:
@@ -308,47 +352,44 @@ spec:
308
352
  fieldRef:
309
353
  fieldPath: status.podIP
310
354
  # needed when another software is also using memberlist / port 7946
355
+ # when changing this default you also need to update the container ports definition
356
+ # and the PodSecurityPolicy hostPorts definition
311
357
  #- name: METALLB_ML_BIND_PORT
312
358
  # value: "7946"
313
359
  - name: METALLB_ML_LABELS
314
360
  value: "app=metallb,component=speaker"
315
- - name: METALLB_ML_NAMESPACE
316
- valueFrom:
317
- fieldRef:
318
- fieldPath: metadata.namespace
319
361
  - name: METALLB_ML_SECRET_KEY
320
362
  valueFrom:
321
363
  secretKeyRef:
322
364
  name: memberlist
323
365
  key: secretkey
324
- image: metallb/speaker:v0.9.4
325
- imagePullPolicy: Always
366
+ image: quay.io/metallb/speaker:v0.10.2
326
367
  name: speaker
327
368
  ports:
328
369
  - containerPort: 7472
329
370
  name: monitoring
330
- resources:
331
- limits:
332
- cpu: 100m
333
- memory: 100Mi
371
+ - containerPort: 7946
372
+ name: memberlist-tcp
373
+ - containerPort: 7946
374
+ name: memberlist-udp
375
+ protocol: UDP
334
376
  securityContext:
335
377
  allowPrivilegeEscalation: false
336
378
  capabilities:
337
379
  add:
338
- - NET_ADMIN
339
380
  - NET_RAW
340
- - SYS_ADMIN
341
381
  drop:
342
382
  - ALL
343
383
  readOnlyRootFilesystem: true
344
384
  hostNetwork: true
345
385
  nodeSelector:
346
- beta.kubernetes.io/os: linux
386
+ kubernetes.io/os: linux
347
387
  serviceAccountName: speaker
348
388
  terminationGracePeriodSeconds: 2
349
389
  tolerations:
350
390
  - effect: NoSchedule
351
391
  key: node-role.kubernetes.io/master
392
+ operator: Exists
352
393
  ---
353
394
  apiVersion: apps/v1
354
395
  kind: Deployment
@@ -377,16 +418,16 @@ spec:
377
418
  - args:
378
419
  - --port=7472
379
420
  - --config=config
380
- image: metallb/controller:v0.9.4
381
- imagePullPolicy: Always
421
+ env:
422
+ - name: METALLB_ML_SECRET_NAME
423
+ value: memberlist
424
+ - name: METALLB_DEPLOYMENT
425
+ value: controller
426
+ image: quay.io/metallb/controller:v0.10.2
382
427
  name: controller
383
428
  ports:
384
429
  - containerPort: 7472
385
430
  name: monitoring
386
- resources:
387
- limits:
388
- cpu: 100m
389
- memory: 100Mi
390
431
  securityContext:
391
432
  allowPrivilegeEscalation: false
392
433
  capabilities:
@@ -400,14 +441,3 @@ spec:
400
441
  runAsUser: 65534
401
442
  serviceAccountName: controller
402
443
  terminationGracePeriodSeconds: 0
403
- ---
404
- apiVersion: v1
405
- kind: ConfigMap
406
- metadata:
407
- labels:
408
- app: metallb
409
- name: config
410
- namespace: metallb-system
411
- data:
412
- config: |
413
- <%= u.indent(global_config.lb.lb_config, 4) %>
@@ -1,327 +1,357 @@
1
- apiVersion: apiextensions.k8s.io/v1beta1
1
+ apiVersion: v1
2
+ kind: Namespace
3
+ metadata:
4
+ name: kube-system
5
+ ---
6
+ apiVersion: apiextensions.k8s.io/v1
2
7
  kind: CustomResourceDefinition
3
8
  metadata:
4
- name: storageversionmigrations.migration.k8s.io
9
+ annotations:
10
+ api-approved.kubernetes.io: https://github.com/kubernetes/enhancements/pull/747
11
+ name: storagestates.migration.k8s.io
5
12
  spec:
6
13
  group: migration.k8s.io
7
14
  names:
8
- kind: StorageVersionMigration
9
- listKind: StorageVersionMigrationList
10
- plural: storageversionmigrations
11
- singular: storageversionmigration
15
+ kind: StorageState
16
+ listKind: StorageStateList
17
+ plural: storagestates
18
+ singular: storagestate
19
+ preserveUnknownFields: false
12
20
  scope: Cluster
13
- subresources:
14
- status: {}
15
- version: v1alpha1
16
21
  versions:
17
22
  - name: v1alpha1
18
- served: true
19
- storage: true
20
- "validation":
21
- "openAPIV3Schema":
22
- description: StorageVersionMigration represents a migration of stored data to
23
- the latest storage version.
24
- type: object
25
- properties:
26
- apiVersion:
27
- description: 'APIVersion defines the versioned schema of this representation
28
- of an object. Servers should convert recognized schemas to the latest
29
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
30
- type: string
31
- kind:
32
- description: 'Kind is a string value representing the REST resource this
33
- object represents. Servers may infer this from the endpoint the client
34
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
35
- type: string
36
- metadata:
37
- type: object
38
- spec:
39
- description: Specification of the migration.
40
- type: object
41
- required:
42
- - resource
43
- properties:
44
- continueToken:
45
- description: The token used in the list options to get the next chunk
46
- of objects to migrate. When the .status.conditions indicates the migration
47
- is "Running", users can use this token to check the progress of the
48
- migration.
49
- type: string
50
- resource:
51
- description: The resource that is being migrated. The migrator sends
52
- requests to the endpoint serving the resource. Immutable.
53
- type: object
54
- properties:
55
- group:
56
- description: The name of the group.
57
- type: string
58
- resource:
59
- description: The name of the resource.
60
- type: string
61
- version:
62
- description: The name of the version.
63
- type: string
64
- status:
65
- description: Status of the migration.
66
- type: object
67
- properties:
68
- conditions:
69
- description: The latest available observations of the migration's current
70
- state.
71
- type: array
72
- items:
73
- description: Describes the state of a migration at a certain point.
74
- type: object
75
- required:
76
- - status
77
- - type
23
+ schema:
24
+ openAPIV3Schema:
25
+ description: The state of the storage of a specific resource.
26
+ properties:
27
+ apiVersion:
28
+ description: 'APIVersion defines the versioned schema of this representation
29
+ of an object. Servers should convert recognized schemas to the latest
30
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
31
+ type: string
32
+ kind:
33
+ description: 'Kind is a string value representing the REST resource this
34
+ object represents. Servers may infer this from the endpoint the client
35
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
36
+ type: string
37
+ metadata:
38
+ properties:
39
+ name:
40
+ description: name must be "<.spec.resource.resouce>.<.spec.resource.group>".
41
+ type: string
42
+ type: object
43
+ spec:
44
+ description: Specification of the storage state.
45
+ properties:
46
+ resource:
47
+ description: The resource this storageState is about.
78
48
  properties:
79
- lastUpdateTime:
80
- description: The last time this condition was updated.
49
+ group:
50
+ description: The name of the group.
81
51
  type: string
82
- format: date-time
83
- message:
84
- description: A human readable message indicating details about
85
- the transition.
86
- type: string
87
- reason:
88
- description: The reason for the condition's last transition.
89
- type: string
90
- status:
91
- description: Status of the condition, one of True, False, Unknown.
92
- type: string
93
- type:
94
- description: Type of the condition.
52
+ resource:
53
+ description: The name of the resource.
95
54
  type: string
55
+ type: object
56
+ type: object
57
+ status:
58
+ description: Status of the storage state.
59
+ properties:
60
+ currentStorageVersionHash:
61
+ description: The hash value of the current storage version, as shown
62
+ in the discovery document served by the API server. Storage Version
63
+ is the version to which objects are converted to before persisted.
64
+ type: string
65
+ lastHeartbeatTime:
66
+ description: LastHeartbeatTime is the last time the storage migration
67
+ triggering controller checks the storage version hash of this resource
68
+ in the discovery document and updates this field.
69
+ format: date-time
70
+ type: string
71
+ persistedStorageVersionHashes:
72
+ description: The hash values of storage versions that persisted instances
73
+ of spec.resource might still be encoded in. "Unknown" is a valid
74
+ value in the list, and is the default value. It is not safe to upgrade
75
+ or downgrade to an apiserver binary that does not support all versions
76
+ listed in this field, or if "Unknown" is listed. Once the storage
77
+ version migration for this resource has completed, the value of
78
+ this field is refined to only contain the currentStorageVersionHash.
79
+ Once the apiserver has changed the storage version, the new storage
80
+ version is appended to the list.
81
+ items:
82
+ type: string
83
+ type: array
84
+ type: object
85
+ type: object
86
+ served: true
87
+ storage: true
88
+ subresources:
89
+ status: {}
96
90
  ---
97
- apiVersion: apiextensions.k8s.io/v1beta1
91
+ apiVersion: apiextensions.k8s.io/v1
98
92
  kind: CustomResourceDefinition
99
93
  metadata:
100
- name: storagestates.migration.k8s.io
94
+ annotations:
95
+ api-approved.kubernetes.io: https://github.com/kubernetes/community/pull/2524
96
+ name: storageversionmigrations.migration.k8s.io
101
97
  spec:
102
98
  group: migration.k8s.io
103
99
  names:
104
- kind: StorageState
105
- listKind: StorageStateList
106
- plural: storagestates
107
- singular: storagestate
100
+ kind: StorageVersionMigration
101
+ listKind: StorageVersionMigrationList
102
+ plural: storageversionmigrations
103
+ singular: storageversionmigration
104
+ preserveUnknownFields: false
108
105
  scope: Cluster
109
- subresources:
110
- status: {}
111
- version: v1alpha1
112
106
  versions:
113
107
  - name: v1alpha1
108
+ schema:
109
+ openAPIV3Schema:
110
+ description: StorageVersionMigration represents a migration of stored data
111
+ to the latest storage version.
112
+ properties:
113
+ apiVersion:
114
+ description: 'APIVersion defines the versioned schema of this representation
115
+ of an object. Servers should convert recognized schemas to the latest
116
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
117
+ type: string
118
+ kind:
119
+ description: 'Kind is a string value representing the REST resource this
120
+ object represents. Servers may infer this from the endpoint the client
121
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
122
+ type: string
123
+ metadata:
124
+ type: object
125
+ spec:
126
+ description: Specification of the migration.
127
+ properties:
128
+ continueToken:
129
+ description: The token used in the list options to get the next chunk
130
+ of objects to migrate. When the .status.conditions indicates the
131
+ migration is "Running", users can use this token to check the progress
132
+ of the migration.
133
+ type: string
134
+ resource:
135
+ description: The resource that is being migrated. The migrator sends
136
+ requests to the endpoint serving the resource. Immutable.
137
+ properties:
138
+ group:
139
+ description: The name of the group.
140
+ type: string
141
+ resource:
142
+ description: The name of the resource.
143
+ type: string
144
+ version:
145
+ description: The name of the version.
146
+ type: string
147
+ type: object
148
+ required:
149
+ - resource
150
+ type: object
151
+ status:
152
+ description: Status of the migration.
153
+ properties:
154
+ conditions:
155
+ description: The latest available observations of the migration's
156
+ current state.
157
+ items:
158
+ description: Describes the state of a migration at a certain point.
159
+ properties:
160
+ lastUpdateTime:
161
+ description: The last time this condition was updated.
162
+ format: date-time
163
+ type: string
164
+ message:
165
+ description: A human readable message indicating details about
166
+ the transition.
167
+ type: string
168
+ reason:
169
+ description: The reason for the condition's last transition.
170
+ type: string
171
+ status:
172
+ description: Status of the condition, one of True, False, Unknown.
173
+ type: string
174
+ type:
175
+ description: Type of the condition.
176
+ type: string
177
+ required:
178
+ - status
179
+ - type
180
+ type: object
181
+ type: array
182
+ type: object
183
+ type: object
114
184
  served: true
115
185
  storage: true
116
- "validation":
117
- "openAPIV3Schema":
118
- description: The state of the storage of a specific resource.
119
- type: object
120
- properties:
121
- apiVersion:
122
- description: 'APIVersion defines the versioned schema of this representation
123
- of an object. Servers should convert recognized schemas to the latest
124
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
125
- type: string
126
- kind:
127
- description: 'Kind is a string value representing the REST resource this
128
- object represents. Servers may infer this from the endpoint the client
129
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
130
- type: string
131
- metadata:
132
- description: The name must be "<.spec.resource.resouce>.<.spec.resource.group>".
133
- type: object
134
- spec:
135
- description: Specification of the storage state.
136
- type: object
137
- properties:
138
- resource:
139
- description: The resource this storageState is about.
140
- type: object
141
- properties:
142
- group:
143
- description: The name of the group.
144
- type: string
145
- resource:
146
- description: The name of the resource.
147
- type: string
148
- status:
149
- description: Status of the storage state.
150
- type: object
151
- properties:
152
- currentStorageVersionHash:
153
- description: The hash value of the current storage version, as shown
154
- in the discovery document served by the API server. Storage Version
155
- is the version to which objects are converted to before persisted.
156
- type: string
157
- lastHeartbeatTime:
158
- description: LastHeartbeatTime is the last time the storage migration
159
- triggering controller checks the storage version hash of this resource
160
- in the discovery document and updates this field.
161
- type: string
162
- format: date-time
163
- persistedStorageVersionHashes:
164
- description: The hash values of storage versions that persisted instances
165
- of spec.resource might still be encoded in. "Unknown" is a valid value
166
- in the list, and is the default value. It is not safe to upgrade or
167
- downgrade to an apiserver binary that does not support all versions
168
- listed in this field, or if "Unknown" is listed. Once the storage
169
- version migration for this resource has completed, the value of this
170
- field is refined to only contain the currentStorageVersionHash. Once
171
- the apiserver has changed the storage version, the new storage version
172
- is appended to the list.
173
- type: array
174
- items:
175
- type: string
176
- ---
177
- apiVersion: v1
178
- kind: Namespace
179
- metadata:
180
- name: kube-system
186
+ subresources:
187
+ status: {}
181
188
  ---
182
- kind: ClusterRole
183
189
  apiVersion: rbac.authorization.k8s.io/v1
190
+ kind: ClusterRole
184
191
  metadata:
185
- name: storage-version-migration-trigger
192
+ name: storage-version-migration-crd-creator
186
193
  rules:
187
- - apiGroups: ["migration.k8s.io"]
188
- resources: ["storagestates"]
189
- verbs: ["watch", "get", "list", "delete", "create", "update"]
190
- - apiGroups: ["migration.k8s.io"]
191
- resources: ["storageversionmigrations"]
192
- verbs: ["watch", "get", "list", "delete", "create"]
194
+ - apiGroups:
195
+ - apiextensions.k8s.io
196
+ resources:
197
+ - customresourcedefinitions
198
+ verbs:
199
+ - create
200
+ - delete
201
+ - get
193
202
  ---
194
- kind: ClusterRole
195
203
  apiVersion: rbac.authorization.k8s.io/v1
204
+ kind: ClusterRole
196
205
  metadata:
197
- name: storage-version-migration-crd-creator
206
+ name: storage-version-migration-initializer
198
207
  rules:
199
- - apiGroups: ["apiextensions.k8s.io"]
200
- resources: ["customresourcedefinitions"]
201
- verbs: ["create", "delete", "get"]
208
+ - apiGroups:
209
+ - migration.k8s.io
210
+ resources:
211
+ - storageversionmigrations
212
+ verbs:
213
+ - create
202
214
  ---
203
- kind: ClusterRole
204
215
  apiVersion: rbac.authorization.k8s.io/v1
216
+ kind: ClusterRole
205
217
  metadata:
206
- name: storage-version-migration-initializer
218
+ name: storage-version-migration-trigger
207
219
  rules:
208
- - apiGroups: ["migration.k8s.io"]
209
- resources: ["storageversionmigrations"]
210
- verbs: ["create"]
220
+ - apiGroups:
221
+ - migration.k8s.io
222
+ resources:
223
+ - storagestates
224
+ verbs:
225
+ - watch
226
+ - get
227
+ - list
228
+ - delete
229
+ - create
230
+ - update
231
+ - apiGroups:
232
+ - migration.k8s.io
233
+ resources:
234
+ - storageversionmigrations
235
+ verbs:
236
+ - watch
237
+ - get
238
+ - list
239
+ - delete
240
+ - create
211
241
  ---
212
- kind: ClusterRoleBinding
213
242
  apiVersion: rbac.authorization.k8s.io/v1
243
+ kind: ClusterRoleBinding
214
244
  metadata:
215
- name: storage-version-migration-migrator
245
+ name: storage-version-migration-crd-creator
246
+ roleRef:
247
+ apiGroup: rbac.authorization.k8s.io
248
+ kind: ClusterRole
249
+ name: storage-version-migration-crd-creator
216
250
  subjects:
217
251
  - kind: ServiceAccount
218
252
  name: default
219
253
  namespace: kube-system
220
- roleRef:
221
- kind: ClusterRole
222
- name: cluster-admin
223
- apiGroup: rbac.authorization.k8s.io
224
254
  ---
225
- kind: ClusterRoleBinding
226
255
  apiVersion: rbac.authorization.k8s.io/v1
256
+ kind: ClusterRoleBinding
227
257
  metadata:
228
- name: storage-version-migration-trigger
258
+ name: storage-version-migration-initializer
259
+ roleRef:
260
+ apiGroup: rbac.authorization.k8s.io
261
+ kind: ClusterRole
262
+ name: storage-version-migration-initializer
229
263
  subjects:
230
264
  - kind: ServiceAccount
231
265
  name: default
232
266
  namespace: kube-system
233
- roleRef:
234
- kind: ClusterRole
235
- name: storage-version-migration-trigger
236
- apiGroup: rbac.authorization.k8s.io
237
267
  ---
238
- kind: ClusterRoleBinding
239
268
  apiVersion: rbac.authorization.k8s.io/v1
269
+ kind: ClusterRoleBinding
240
270
  metadata:
241
- name: storage-version-migration-crd-creator
271
+ name: storage-version-migration-migrator
272
+ roleRef:
273
+ apiGroup: rbac.authorization.k8s.io
274
+ kind: ClusterRole
275
+ name: cluster-admin
242
276
  subjects:
243
277
  - kind: ServiceAccount
244
278
  name: default
245
279
  namespace: kube-system
246
- roleRef:
247
- kind: ClusterRole
248
- name: storage-version-migration-crd-creator
249
- apiGroup: rbac.authorization.k8s.io
250
280
  ---
251
- kind: ClusterRoleBinding
252
281
  apiVersion: rbac.authorization.k8s.io/v1
282
+ kind: ClusterRoleBinding
253
283
  metadata:
254
- name: storage-version-migration-initializer
284
+ name: storage-version-migration-trigger
285
+ roleRef:
286
+ apiGroup: rbac.authorization.k8s.io
287
+ kind: ClusterRole
288
+ name: storage-version-migration-trigger
255
289
  subjects:
256
290
  - kind: ServiceAccount
257
291
  name: default
258
292
  namespace: kube-system
259
- roleRef:
260
- kind: ClusterRole
261
- name: storage-version-migration-initializer
262
- apiGroup: rbac.authorization.k8s.io
263
293
  ---
264
294
  apiVersion: apps/v1
265
295
  kind: Deployment
266
296
  metadata:
267
- name: trigger
268
- namespace: kube-system
269
297
  labels:
270
- app: trigger
298
+ app: migrator
299
+ name: migrator
300
+ namespace: kube-system
271
301
  spec:
272
302
  replicas: 1
273
303
  selector:
274
304
  matchLabels:
275
- app: trigger
305
+ app: migrator
276
306
  template:
277
307
  metadata:
278
308
  labels:
279
- app: trigger
309
+ app: migrator
280
310
  spec:
281
311
  containers:
282
- - name: trigger
283
- image: yuanying/storage-version-migration-trigger:v0.1
284
- args:
285
- - --kubeconfig=/etc/trigger/kubeconfig
312
+ - command:
313
+ - /migrator
314
+ - --v=2
315
+ - --alsologtostderr
316
+ - --kube-api-qps=40
317
+ - --kube-api-burst=1000
318
+ - --kubeconfig=/etc/migrator/kubeconfig
319
+ image: asia.gcr.io/k8s-artifacts-prod/storage-migrator/storage-version-migration-migrator:v0.0.3
320
+ name: migrator
286
321
  volumeMounts:
287
- - mountPath: /etc/trigger
322
+ - mountPath: /etc/migrator
288
323
  name: kubeconfig
289
324
  volumes:
290
- - name: kubeconfig
291
- configMap:
325
+ - configMap:
292
326
  name: kubeconfig-in-cluster-latest
327
+ name: kubeconfig
293
328
  ---
294
329
  apiVersion: apps/v1
295
330
  kind: Deployment
296
331
  metadata:
297
- name: migrator
298
- namespace: kube-system
299
332
  labels:
300
- app: migrator
333
+ app: trigger
334
+ name: trigger
335
+ namespace: kube-system
301
336
  spec:
302
337
  replicas: 1
303
338
  selector:
304
339
  matchLabels:
305
- app: migrator
340
+ app: trigger
306
341
  template:
307
342
  metadata:
308
343
  labels:
309
- app: migrator
344
+ app: trigger
310
345
  spec:
311
346
  containers:
312
- - name: migrator
313
- image: yuanying/storage-version-migration-migrator:v0.1
314
- command:
315
- - /migrator
316
- - --v=2
317
- - --alsologtostderr
318
- - --kube-api-qps=40
319
- - --kube-api-burst=1000
320
- - --kubeconfig=/etc/migrator/kubeconfig
347
+ - args:
348
+ - --kubeconfig=/etc/migrator/kubeconfig
349
+ image: asia.gcr.io/k8s-artifacts-prod/storage-migrator/storage-version-migration-trigger:v0.0.3
350
+ name: trigger
321
351
  volumeMounts:
322
352
  - mountPath: /etc/migrator
323
353
  name: kubeconfig
324
354
  volumes:
325
- - name: kubeconfig
326
- configMap:
355
+ - configMap:
327
356
  name: kubeconfig-in-cluster-latest
357
+ name: kubeconfig