diff --git a/charts/mirrorbits/templates/deployment.files.yaml b/charts/mirrorbits/templates/deployment.files.yaml index 3cc51ab1a..cb67fcf9f 100644 --- a/charts/mirrorbits/templates/deployment.files.yaml +++ b/charts/mirrorbits/templates/deployment.files.yaml @@ -49,7 +49,7 @@ spec: nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.affinity.files }} affinity: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/mirrorbits/templates/deployment.rsyncd.yaml b/charts/mirrorbits/templates/deployment.rsyncd.yaml index b1cb89840..864bf2c43 100644 --- a/charts/mirrorbits/templates/deployment.rsyncd.yaml +++ b/charts/mirrorbits/templates/deployment.rsyncd.yaml @@ -58,7 +58,7 @@ spec: nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.affinity.rsyncd }} affinity: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/mirrorbits/templates/deployment.yaml b/charts/mirrorbits/templates/deployment.yaml index 2c0f4f4a6..f8b071afa 100644 --- a/charts/mirrorbits/templates/deployment.yaml +++ b/charts/mirrorbits/templates/deployment.yaml @@ -96,7 +96,7 @@ spec: nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.affinity.mirrorbits }} affinity: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/mirrorbits/tests/custom_values_test.yaml b/charts/mirrorbits/tests/custom_values_test.yaml index 4d42169e7..28d8909c5 100644 --- a/charts/mirrorbits/tests/custom_values_test.yaml +++ b/charts/mirrorbits/tests/custom_values_test.yaml @@ -111,6 +111,9 @@ tests: - equal: path: "spec.template.spec.containers[*].imagePullPolicy" value: Never + - equal: + path: spec.template.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[0].topologyKey + value: "kubernetes.io/hostname" - it: should define a customized "mirrorbits" deployment template: deployment.yaml asserts: @@ -135,7 +138,7 @@ tests: path: spec.template.spec.containers[0].volumeMounts[2].mountPath value: /var/log/mirrorbits - equal: - path: spec.template.spec.affinity.mirrorbits.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[0].topologyKey + path: spec.template.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[0].topologyKey value: "kubernetes.io/hostname" - it: should create ingress with pathType set to the specified custom value by default template: ingress.yaml @@ -154,6 +157,9 @@ tests: count: 1 - isKind: of: Deployment + - equal: + path: spec.template.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[0].topologyKey + value: "kubernetes.io/hostname" - it: should create rsyncd service if rsyncd is enabled template: service.rsyncd.yaml asserts: diff --git a/charts/mirrorbits/values.yaml b/charts/mirrorbits/values.yaml index 1f65e753f..378c2088b 100644 --- a/charts/mirrorbits/values.yaml +++ b/charts/mirrorbits/values.yaml @@ -69,7 +69,10 @@ resources: {} # memory: 128Mi nodeSelector: {} tolerations: [] -affinity: {} +affinity: + mirrorbits: {} + files: {} + rsyncd: {} geoipupdate: image: repository: maxmindinc/geoipupdate