Skip to content

Commit

Permalink
Merge pull request #318 from spinkube/dani/only-run-on-correct-archs
Browse files Browse the repository at this point in the history
  • Loading branch information
endocrimes authored Sep 18, 2024
2 parents ea924ac + cf315ce commit 1196fce
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 20 deletions.
14 changes: 14 additions & 0 deletions charts/spin-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ spec:
annotations:
kubectl.kubernetes.io/default-container: manager
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- arm64
- key: kubernetes.io/os
operator: In
values:
- linux
containers:
- args: {{- toYaml .Values.controllerManager.manager.args | nindent 8 }}
command:
Expand Down
34 changes: 14 additions & 20 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,20 @@ spec:
labels:
control-plane: controller-manager
spec:
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
# according to the platforms which are supported by your solution.
# It is considered best practice to support multiple architectures. You can
# build your manager image using the makefile target docker-buildx.
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: kubernetes.io/arch
# operator: In
# values:
# - amd64
# - arm64
# - ppc64le
# - s390x
# - key: kubernetes.io/os
# operator: In
# values:
# - linux
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- arm64
- key: kubernetes.io/os
operator: In
values:
- linux
securityContext:
runAsNonRoot: true
# TODO(user): For common cases that do not require escalating privileges
Expand Down

0 comments on commit 1196fce

Please sign in to comment.