helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Add node selector to deployments

Open atropos112 opened this issue 2 years ago • 3 comments

Rocketchat (currently) does not support arm64. I am running nodes that are both arm64 and amd64 and currently can't select for rocketchat to only run on amd64 as such I sometimes see crashlooping because it tries to schedule on arm64 node.

Best and easiest solution here is to add nodeSelector to deployment templates. PR here: https://github.com/RocketChat/helm-charts/pull/98

atropos112 avatar May 02 '23 18:05 atropos112

I don't mind closing mine: https://github.com/RocketChat/helm-charts/issues/97 ?

ChrisJBurns avatar May 17 '23 16:05 ChrisJBurns

you can use the affinity node to do this select, however than you run into the issue with upgrading that the hook-verify-mongodb-version.yaml does not support this affinity and can deploy a pod on a ARM node.

So that yaml will also need to be updated.

to use the affinity you get something like this:

affinity:
  nodeAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/arch
          operator: In
          values:
          - amd64

TheBoboNL avatar Jul 03 '23 20:07 TheBoboNL

@TheBoboNL its recommended to use nodeSelector as per https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity

ChrisJBurns avatar Jul 03 '23 20:07 ChrisJBurns