Skip to content

Commit fae5286

Browse files
committed
Make sure controller ignores NoSchedule taints
1 parent 62fe69b commit fae5286

1 file changed

Lines changed: 43 additions & 29 deletions

File tree

config/manager/manager.yaml

Lines changed: 43 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,37 +24,51 @@ spec:
2424
labels:
2525
control-plane: controller-manager
2626
spec:
27+
# Node affinity is used instead of nodeSelector,
28+
# as the pod should tolerate all taints and still
29+
# not be executed on master/control plane nodes.
30+
affinity:
31+
nodeAffinity:
32+
requiredDuringSchedulingIgnoredDuringExecution:
33+
nodeSelectorTerms:
34+
- matchExpressions:
35+
- key: node-role.kubernetes.io/control-plane
36+
operator: DoesNotExist
37+
# Ignore all NoSchedule taints
38+
tolerations:
39+
- effect: NoSchedule
40+
operator: Exists
2741
securityContext:
2842
runAsNonRoot: true
2943
containers:
30-
- command:
31-
- /manager
32-
args:
33-
- --leader-elect
34-
image: controller:latest
35-
name: manager
36-
securityContext:
37-
allowPrivilegeEscalation: false
38-
livenessProbe:
39-
httpGet:
40-
path: /healthz
41-
port: 8081
42-
initialDelaySeconds: 15
43-
periodSeconds: 20
44-
readinessProbe:
45-
httpGet:
46-
path: /readyz
47-
port: 8081
48-
initialDelaySeconds: 5
49-
periodSeconds: 10
50-
# TODO(user): Configure the resources accordingly based on the project requirements.
51-
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
52-
resources:
53-
limits:
54-
cpu: 500m
55-
memory: 128Mi
56-
requests:
57-
cpu: 10m
58-
memory: 64Mi
44+
- command:
45+
- /manager
46+
args:
47+
- --leader-elect
48+
image: controller:latest
49+
name: manager
50+
securityContext:
51+
allowPrivilegeEscalation: false
52+
livenessProbe:
53+
httpGet:
54+
path: /healthz
55+
port: 8081
56+
initialDelaySeconds: 15
57+
periodSeconds: 20
58+
readinessProbe:
59+
httpGet:
60+
path: /readyz
61+
port: 8081
62+
initialDelaySeconds: 5
63+
periodSeconds: 10
64+
# TODO(user): Configure the resources accordingly based on the project requirements.
65+
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
66+
resources:
67+
limits:
68+
cpu: 500m
69+
memory: 128Mi
70+
requests:
71+
cpu: 10m
72+
memory: 64Mi
5973
serviceAccountName: controller-manager
6074
terminationGracePeriodSeconds: 10

0 commit comments

Comments
 (0)