From e7b4e4fd3ad5cdb995cb6959a6625f9c623d1a59 Mon Sep 17 00:00:00 2001 From: Michael Goehler Date: Fri, 7 Jun 2024 10:55:16 +0200 Subject: [PATCH] adding support for topologySpreadConstraints --- config/helm/appmesh-controller/README.md | 3 ++- config/helm/appmesh-controller/templates/deployment.yaml | 4 ++++ config/helm/appmesh-controller/test.yaml | 7 +++++++ config/helm/appmesh-controller/values.yaml | 7 +++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/config/helm/appmesh-controller/README.md b/config/helm/appmesh-controller/README.md index 2e2b0435..730c3937 100644 --- a/config/helm/appmesh-controller/README.md +++ b/config/helm/appmesh-controller/README.md @@ -450,4 +450,5 @@ Parameter | Description | Default `livenessProbe` | Liveness probe settings for the controller | (see `values.yaml`) `podDisruptionBudget` | PodDisruptionBudget | `{}` `tlsMinVersion` | Minimum TLS version for the controller webhook server as shown in [here](https://github.com/kubernetes/component-base/blob/master/cli/flag/ciphersuites_flag.go#L114) | `VersionTLS12` -`tlsCipherSuite` | Comma delimited TLS cipher suites for the controller webhook server as shown [here](https://pkg.go.dev/crypto/tls#pkg-constants) | None \ No newline at end of file +`tlsCipherSuite` | Comma delimited TLS cipher suites for the controller webhook server as shown [here](https://pkg.go.dev/crypto/tls#pkg-constants) | None +`topologySpreadConstraints` | Topology Spread Constraints for pod assignment | `{}` \ No newline at end of file diff --git a/config/helm/appmesh-controller/templates/deployment.yaml b/config/helm/appmesh-controller/templates/deployment.yaml index ab46d793..0be08156 100644 --- a/config/helm/appmesh-controller/templates/deployment.yaml +++ b/config/helm/appmesh-controller/templates/deployment.yaml @@ -150,3 +150,7 @@ spec: tolerations: {{ toYaml . | indent 8 }} {{- end }} + {{- with .Values.topologySpreadConstraints }} + topologySpreadConstraints: +{{- toYaml . | indent 8 }} + {{- end }} diff --git a/config/helm/appmesh-controller/test.yaml b/config/helm/appmesh-controller/test.yaml index 1234d6ea..6e965902 100644 --- a/config/helm/appmesh-controller/test.yaml +++ b/config/helm/appmesh-controller/test.yaml @@ -80,6 +80,13 @@ affinity: { test: test } +# topologySpreadConstraints is a stable feature of k8s v1.19 which provides the ability to +# control how Pods are spread across your cluster among failure-domains such as regions, zones, +# nodes, and other user-defined topology domains. +# +# more details here: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ +topologySpreadConstraints: {} + podAnnotations: { test: test } diff --git a/config/helm/appmesh-controller/values.yaml b/config/helm/appmesh-controller/values.yaml index 780481da..ea98450d 100644 --- a/config/helm/appmesh-controller/values.yaml +++ b/config/helm/appmesh-controller/values.yaml @@ -73,6 +73,13 @@ tolerations: [] affinity: {} +# topologySpreadConstraints is a stable feature of k8s v1.19 which provides the ability to +# control how Pods are spread across your cluster among failure-domains such as regions, zones, +# nodes, and other user-defined topology domains. +# +# more details here: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ +topologySpreadConstraints: {} + podAnnotations: {} podLabels: {}