diff --git a/charts/tofu-controller/README.md b/charts/tofu-controller/README.md index 2d45c7dd..549c67e4 100644 --- a/charts/tofu-controller/README.md +++ b/charts/tofu-controller/README.md @@ -93,6 +93,7 @@ __Note__: If you need to use the `imagePullSecrets` it would be best to set `ser | serviceAccount.create | bool | `true` | If `true`, create a new service account | | serviceAccount.name | string | tofu-controller | Service account to be used | | tolerations | list | `[]` | Tolerations properties for the tofu-controller deployment | +| updateStrategy | object | `{}` | Customize updateStrategy on controller and branch-planner | | usePodSubdomainResolution | bool | `false` | Argument for `--use-pod-subdomain-resolution` (Controller). UsePodSubdomainResolution allow pod hostname/subdomain DNS resolution for the pod runner instead of IP based DNS resolution. | | volumeMounts | list | `[]` | Volume mounts properties for the tofu-controller deployment | | volumes | list | `[]` | Volumes properties for the tofu-controller deployment | diff --git a/charts/tofu-controller/templates/deployment.yaml b/charts/tofu-controller/templates/deployment.yaml index e4f19e74..a2849d73 100644 --- a/charts/tofu-controller/templates/deployment.yaml +++ b/charts/tofu-controller/templates/deployment.yaml @@ -6,6 +6,9 @@ metadata: name: {{ include "tofu-controller.fullname" . }} spec: replicas: {{ .Values.replicaCount }} + {{- with .Values.updateStrategy }} + strategy: {{ toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "tofu-controller.selectorLabels" . | nindent 6 }} diff --git a/charts/tofu-controller/templates/planner-deployment.yaml b/charts/tofu-controller/templates/planner-deployment.yaml index 18fc5293..ce035c38 100644 --- a/charts/tofu-controller/templates/planner-deployment.yaml +++ b/charts/tofu-controller/templates/planner-deployment.yaml @@ -8,6 +8,9 @@ metadata: spec: # Planner can't be scaled yet. replicas: 1 + {{- with .Values.updateStrategy }} + strategy: {{ toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "planner.selectorLabels" . | nindent 6 }} diff --git a/charts/tofu-controller/values.yaml b/charts/tofu-controller/values.yaml index a4634cbe..8717318a 100644 --- a/charts/tofu-controller/values.yaml +++ b/charts/tofu-controller/values.yaml @@ -42,6 +42,8 @@ resources: memory: 64Mi # -- Additional container environment variables. extraEnv: {} +# -- Customize updateStrategy on controller and branch-planner +updateStrategy: {} # -- Pod-level security context podSecurityContext: fsGroup: 1337