1
- # from https://github.com/metallb/metallb/tree /v0.9.3 /manifests namespace.yaml and metallb.yaml
1
+ # from https://github.com/metallb/metallb/blob /v0.12 /manifests namespace.yaml and metallb.yaml
2
2
apiVersion : v1
3
3
kind : Namespace
4
4
metadata :
@@ -12,7 +12,6 @@ metadata:
12
12
labels :
13
13
app : metallb
14
14
name : controller
15
- namespace : metallb-system
16
15
spec :
17
16
allowPrivilegeEscalation : false
18
17
allowedCapabilities : []
@@ -54,13 +53,10 @@ metadata:
54
53
labels :
55
54
app : metallb
56
55
name : speaker
57
- namespace : metallb-system
58
56
spec :
59
57
allowPrivilegeEscalation : false
60
58
allowedCapabilities :
61
- - NET_ADMIN
62
59
- NET_RAW
63
- - SYS_ADMIN
64
60
allowedHostPaths : []
65
61
defaultAddCapabilities : []
66
62
defaultAllowPrivilegeEscalation : false
72
68
hostPorts :
73
69
- max : 7472
74
70
min : 7472
71
+ - max : 7946
72
+ min : 7946
75
73
privileged : true
76
74
readOnlyRootFilesystem : true
77
75
requiredDropCapabilities :
@@ -118,7 +116,6 @@ rules:
118
116
- get
119
117
- list
120
118
- watch
121
- - update
122
119
- apiGroups :
123
120
- ' '
124
121
resources :
@@ -158,6 +155,13 @@ rules:
158
155
- get
159
156
- list
160
157
- watch
158
+ - apiGroups : ["discovery.k8s.io"]
159
+ resources :
160
+ - endpointslices
161
+ verbs :
162
+ - get
163
+ - list
164
+ - watch
161
165
- apiGroups :
162
166
- ' '
163
167
resources :
@@ -207,6 +211,37 @@ rules:
207
211
- list
208
212
---
209
213
apiVersion : rbac.authorization.k8s.io/v1
214
+ kind : Role
215
+ metadata :
216
+ labels :
217
+ app : metallb
218
+ name : controller
219
+ namespace : metallb-system
220
+ rules :
221
+ - apiGroups :
222
+ - ' '
223
+ resources :
224
+ - secrets
225
+ verbs :
226
+ - create
227
+ - apiGroups :
228
+ - ' '
229
+ resources :
230
+ - secrets
231
+ resourceNames :
232
+ - memberlist
233
+ verbs :
234
+ - list
235
+ - apiGroups :
236
+ - apps
237
+ resources :
238
+ - deployments
239
+ resourceNames :
240
+ - controller
241
+ verbs :
242
+ - get
243
+ ---
244
+ apiVersion : rbac.authorization.k8s.io/v1
210
245
kind : ClusterRoleBinding
211
246
metadata :
212
247
labels :
@@ -268,6 +303,21 @@ subjects:
268
303
- kind : ServiceAccount
269
304
name : speaker
270
305
---
306
+ apiVersion : rbac.authorization.k8s.io/v1
307
+ kind : RoleBinding
308
+ metadata :
309
+ labels :
310
+ app : metallb
311
+ name : controller
312
+ namespace : metallb-system
313
+ roleRef :
314
+ apiGroup : rbac.authorization.k8s.io
315
+ kind : Role
316
+ name : controller
317
+ subjects :
318
+ - kind : ServiceAccount
319
+ name : controller
320
+ ---
271
321
apiVersion : apps/v1
272
322
kind : DaemonSet
273
323
metadata :
@@ -294,6 +344,7 @@ spec:
294
344
- args :
295
345
- --port=7472
296
346
- --config=config
347
+ - --log-level=info
297
348
env :
298
349
- name : METALLB_NODE_NAME
299
350
valueFrom :
@@ -307,45 +358,63 @@ spec:
307
358
valueFrom :
308
359
fieldRef :
309
360
fieldPath : status.podIP
361
+ # needed when another software is also using memberlist / port 7946
362
+ # when changing this default you also need to update the container ports definition
363
+ # and the PodSecurityPolicy hostPorts definition
364
+ # - name: METALLB_ML_BIND_PORT
365
+ # value: "7946"
310
366
- name : METALLB_ML_LABELS
311
367
value : " app=metallb,component=speaker"
312
- - name : METALLB_ML_NAMESPACE
313
- valueFrom :
314
- fieldRef :
315
- fieldPath : metadata.namespace
316
368
- name : METALLB_ML_SECRET_KEY
317
369
valueFrom :
318
370
secretKeyRef :
319
371
name : memberlist
320
372
key : secretkey
321
- image : metallb/speaker:v0.9.3
322
- imagePullPolicy : Always
373
+ image : gcr.io/istio-testing/metallb/speaker:v0.12.1
323
374
name : speaker
324
375
ports :
325
376
- containerPort : 7472
326
377
name : monitoring
327
- resources :
328
- limits :
329
- cpu : 100m
330
- memory : 100Mi
378
+ - containerPort : 7946
379
+ name : memberlist-tcp
380
+ - containerPort : 7946
381
+ name : memberlist-udp
382
+ protocol : UDP
383
+ livenessProbe :
384
+ httpGet :
385
+ path : /metrics
386
+ port : monitoring
387
+ initialDelaySeconds : 5
388
+ periodSeconds : 10
389
+ timeoutSeconds : 1
390
+ successThreshold : 1
391
+ failureThreshold : 3
392
+ readinessProbe :
393
+ httpGet :
394
+ path : /metrics
395
+ port : monitoring
396
+ initialDelaySeconds : 5
397
+ periodSeconds : 10
398
+ timeoutSeconds : 1
399
+ successThreshold : 1
400
+ failureThreshold : 3
331
401
securityContext :
332
402
allowPrivilegeEscalation : false
333
403
capabilities :
334
404
add :
335
- - NET_ADMIN
336
405
- NET_RAW
337
- - SYS_ADMIN
338
406
drop :
339
407
- ALL
340
408
readOnlyRootFilesystem : true
341
409
hostNetwork : true
342
410
nodeSelector :
343
- beta. kubernetes.io/os : linux
411
+ kubernetes.io/os : linux
344
412
serviceAccountName : speaker
345
413
terminationGracePeriodSeconds : 2
346
414
tolerations :
347
415
- effect : NoSchedule
348
416
key : node-role.kubernetes.io/master
417
+ operator : Exists
349
418
---
350
419
apiVersion : apps/v1
351
420
kind : Deployment
@@ -374,26 +443,46 @@ spec:
374
443
- args :
375
444
- --port=7472
376
445
- --config=config
377
- image : metallb/controller:v0.9.3
378
- imagePullPolicy : Always
446
+ - --log-level=info
447
+ env :
448
+ - name : METALLB_ML_SECRET_NAME
449
+ value : memberlist
450
+ - name : METALLB_DEPLOYMENT
451
+ value : controller
452
+ image : gcr.io/istio-testing/metallb/controller:v0.12.1
379
453
name : controller
380
454
ports :
381
455
- containerPort : 7472
382
456
name : monitoring
383
- resources :
384
- limits :
385
- cpu : 100m
386
- memory : 100Mi
457
+ livenessProbe :
458
+ httpGet :
459
+ path : /metrics
460
+ port : monitoring
461
+ initialDelaySeconds : 10
462
+ periodSeconds : 10
463
+ timeoutSeconds : 1
464
+ successThreshold : 1
465
+ failureThreshold : 3
466
+ readinessProbe :
467
+ httpGet :
468
+ path : /metrics
469
+ port : monitoring
470
+ initialDelaySeconds : 10
471
+ periodSeconds : 10
472
+ timeoutSeconds : 1
473
+ successThreshold : 1
474
+ failureThreshold : 3
387
475
securityContext :
388
476
allowPrivilegeEscalation : false
389
477
capabilities :
390
478
drop :
391
479
- all
392
480
readOnlyRootFilesystem : true
393
481
nodeSelector :
394
- beta. kubernetes.io/os : linux
482
+ kubernetes.io/os : linux
395
483
securityContext :
396
484
runAsNonRoot : true
397
485
runAsUser : 65534
486
+ fsGroup : 65534
398
487
serviceAccountName : controller
399
488
terminationGracePeriodSeconds : 0
0 commit comments