Is this a request for help?:
No
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Feature Request
It would be nice to support topologySpreadConstraints for the artifactory-ha chart to support spreading Artifactory and nginx pods across multiple nodes / zones. Right now we can technically use podAntiAffinity to force one Artifactory / nginx pod per node, but that's not as flexible as topologySpreadConstraints.
I'm envisioning something along the lines of this in `values.yaml:
artifactory:
topologySpreadConstraints:
maxSkew: 1
whenUnsatisfiable: DoNotSchedule
topologyKey: kubernetes.io/hostname
nginx:
topologySpreadConstraints:
maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
which gets populated as the following in the primary and member statefulsets:
spec:
template:
spec:
topologySpreadConstraints:
maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
component: artifactory-ha # or some other label that applies to the primary and all members
and similar for nginx, just with a different labelSelector that matches all nginx pods instead. This guarantees that all Artifactory pods and all nginx pods are spread evenly across all nodes.
Version of Helm and Kubernetes:
Helm 3.8.0, Kubernetes v1.20.11-eks-f17b81
Which chart:
artifactory-ha, although other charts can benefit from this as well
Is this a request for help?:
No
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Feature Request
It would be nice to support
topologySpreadConstraintsfor theartifactory-hachart to support spreading Artifactory and nginx pods across multiple nodes / zones. Right now we can technically usepodAntiAffinityto force one Artifactory / nginx pod per node, but that's not as flexible astopologySpreadConstraints.I'm envisioning something along the lines of this in `values.yaml:
which gets populated as the following in the primary and member statefulsets:
and similar for nginx, just with a different
labelSelectorthat matches all nginx pods instead. This guarantees that all Artifactory pods and all nginx pods are spread evenly across all nodes.Version of Helm and Kubernetes:
Helm
3.8.0, Kubernetesv1.20.11-eks-f17b81Which chart:
artifactory-ha, although other charts can benefit from this as well