Skip to content

Commit 1196fce

Browse files
authored
Merge pull request #318 from spinkube/dani/only-run-on-correct-archs
2 parents ea924ac + cf315ce commit 1196fce

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

charts/spin-operator/templates/deployment.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@ spec:
2222
annotations:
2323
kubectl.kubernetes.io/default-container: manager
2424
spec:
25+
affinity:
26+
nodeAffinity:
27+
requiredDuringSchedulingIgnoredDuringExecution:
28+
nodeSelectorTerms:
29+
- matchExpressions:
30+
- key: kubernetes.io/arch
31+
operator: In
32+
values:
33+
- amd64
34+
- arm64
35+
- key: kubernetes.io/os
36+
operator: In
37+
values:
38+
- linux
2539
containers:
2640
- args: {{- toYaml .Values.controllerManager.manager.args | nindent 8 }}
2741
command:

config/manager/manager.yaml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,20 @@ spec:
3636
labels:
3737
control-plane: controller-manager
3838
spec:
39-
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
40-
# according to the platforms which are supported by your solution.
41-
# It is considered best practice to support multiple architectures. You can
42-
# build your manager image using the makefile target docker-buildx.
43-
# affinity:
44-
# nodeAffinity:
45-
# requiredDuringSchedulingIgnoredDuringExecution:
46-
# nodeSelectorTerms:
47-
# - matchExpressions:
48-
# - key: kubernetes.io/arch
49-
# operator: In
50-
# values:
51-
# - amd64
52-
# - arm64
53-
# - ppc64le
54-
# - s390x
55-
# - key: kubernetes.io/os
56-
# operator: In
57-
# values:
58-
# - linux
39+
affinity:
40+
nodeAffinity:
41+
requiredDuringSchedulingIgnoredDuringExecution:
42+
nodeSelectorTerms:
43+
- matchExpressions:
44+
- key: kubernetes.io/arch
45+
operator: In
46+
values:
47+
- amd64
48+
- arm64
49+
- key: kubernetes.io/os
50+
operator: In
51+
values:
52+
- linux
5953
securityContext:
6054
runAsNonRoot: true
6155
# TODO(user): For common cases that do not require escalating privileges

0 commit comments

Comments
 (0)