From 6134073d3d8288708543d7d177e393c8587a0492 Mon Sep 17 00:00:00 2001 From: Tiago Ferreira Date: Sun, 21 Jan 2024 17:07:09 +0000 Subject: [PATCH] config: restrict deployments to amd64 nodes Until samba-operator supports other architectures (namely, ARM64), restrict its deployment to AMD64 nodes (e.g., in cases of non x86_64 or mixed ARCH clusters) via standard K8s node-selector mechanism [1]. [1] https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ Signed-off-by: Tiago Ferreira Co-authored-by: Shachar Sharon --- config/manager-full/auth_proxy_patch.yaml | 9 +++++++++ config/manager/manager.yaml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/config/manager-full/auth_proxy_patch.yaml b/config/manager-full/auth_proxy_patch.yaml index cc8903bb..3a67df2b 100644 --- a/config/manager-full/auth_proxy_patch.yaml +++ b/config/manager-full/auth_proxy_patch.yaml @@ -8,6 +8,15 @@ metadata: spec: template: spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 containers: - name: kube-rbac-proxy # this is apparently the same code as diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 974537ed..13635412 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -31,6 +31,15 @@ spec: kubectl.kubernetes.io/default-logs-container: manager kubectl.kubernetes.io/default-container: manager spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 containers: - command: - /manager