From bf04ddac2257a9e68c501df702998206e31d08ad Mon Sep 17 00:00:00 2001 From: Zadkiel Aharonian Date: Fri, 18 Aug 2023 10:29:03 +0200 Subject: [PATCH] feat(helm): add topologySpreadConstraints Add support for Capsule deployment topologySpreadConstraints in Capsule Helm Chart. Signed-off-by: Zadkiel Aharonian --- charts/capsule/Chart.yaml | 2 +- charts/capsule/README.md | 1 + charts/capsule/templates/deployment.yaml | 4 ++++ charts/capsule/values.yaml | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/capsule/Chart.yaml b/charts/capsule/Chart.yaml index 27e1c9cb..a3aa7ec8 100644 --- a/charts/capsule/Chart.yaml +++ b/charts/capsule/Chart.yaml @@ -21,7 +21,7 @@ sources: # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.4.5 +version: 0.4.6 # This is the version number of the application being deployed. # This version number should be incremented each time you make changes to the application. diff --git a/charts/capsule/README.md b/charts/capsule/README.md index d7e0040d..d27b79a8 100644 --- a/charts/capsule/README.md +++ b/charts/capsule/README.md @@ -85,6 +85,7 @@ Here the values you can override: | tls.enableController | bool | `true` | Start the Capsule controller that injects the CA into mutating and validating webhooks, and CRD as well. | | tls.name | string | `""` | Override name of the Capsule TLS Secret name when externally managed. | | tolerations | list | `[]` | Set list of tolerations for the Capsule pod | +| topologySpreadConstraints | list | `[]` | Set topology spread constraints for the Capsule pod | | validatingWebhooksTimeoutSeconds | int | `30` | Timeout in seconds for validating webhooks | ### Manager Parameters diff --git a/charts/capsule/templates/deployment.yaml b/charts/capsule/templates/deployment.yaml index e0e6114e..780876ed 100644 --- a/charts/capsule/templates/deployment.yaml +++ b/charts/capsule/templates/deployment.yaml @@ -49,6 +49,10 @@ spec: affinity: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} volumes: - name: cert secret: diff --git a/charts/capsule/values.yaml b/charts/capsule/values.yaml index 215a3426..29b72e3b 100644 --- a/charts/capsule/values.yaml +++ b/charts/capsule/values.yaml @@ -126,6 +126,9 @@ replicaCount: 1 # -- Set affinity rules for the Capsule pod affinity: {} +# -- Set topology spread constraints for the Capsule pod +topologySpreadConstraints: [] + podSecurityPolicy: # -- Specify if a Pod Security Policy must be created enabled: false