From c50e5a9236475de98f23229b5c34b7f203e0e3a1 Mon Sep 17 00:00:00 2001 From: Henrik Gerdes Date: Mon, 30 Sep 2024 16:53:22 +0200 Subject: [PATCH] feat: allow setting init containers for cluster-autoscaler Signed-off-by: Henrik Gerdes --- charts/cluster-autoscaler/Chart.yaml | 2 +- charts/cluster-autoscaler/README.md | 1 + charts/cluster-autoscaler/templates/deployment.yaml | 4 ++++ charts/cluster-autoscaler/values.yaml | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/cluster-autoscaler/Chart.yaml b/charts/cluster-autoscaler/Chart.yaml index 2bf9ef32afe3..fbe7fa807601 100644 --- a/charts/cluster-autoscaler/Chart.yaml +++ b/charts/cluster-autoscaler/Chart.yaml @@ -11,4 +11,4 @@ name: cluster-autoscaler sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler type: application -version: 9.41.0 +version: 9.42.0 diff --git a/charts/cluster-autoscaler/README.md b/charts/cluster-autoscaler/README.md index b267b327ddc1..24323b79d04d 100644 --- a/charts/cluster-autoscaler/README.md +++ b/charts/cluster-autoscaler/README.md @@ -440,6 +440,7 @@ vpa: | image.pullSecrets | list | `[]` | Image pull secrets | | image.repository | string | `"registry.k8s.io/autoscaling/cluster-autoscaler"` | Image repository | | image.tag | string | `"v1.31.0"` | Image tag | +| initContainers | list | `[]` | Any additional init containers. | | kubeTargetVersionOverride | string | `""` | Allow overriding the `.Capabilities.KubeVersion.GitVersion` check. Useful for `helm template` commands. | | kwokConfigMapName | string | `"kwok-provider-config"` | configmap for configuring kwok provider | | magnumCABundlePath | string | `"/etc/kubernetes/ca-bundle.crt"` | Path to the host's CA bundle, from `ca-file` in the cloud-config file. | diff --git a/charts/cluster-autoscaler/templates/deployment.yaml b/charts/cluster-autoscaler/templates/deployment.yaml index 1b06186bf212..4850c7903805 100644 --- a/charts/cluster-autoscaler/templates/deployment.yaml +++ b/charts/cluster-autoscaler/templates/deployment.yaml @@ -46,6 +46,10 @@ spec: {{- if .Values.hostNetwork }} hostNetwork: {{ .Values.hostNetwork }} {{- end }} + {{- with .Values.initContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ template "cluster-autoscaler.name" . }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/charts/cluster-autoscaler/values.yaml b/charts/cluster-autoscaler/values.yaml index 221c2022f55d..cd7667157de3 100644 --- a/charts/cluster-autoscaler/values.yaml +++ b/charts/cluster-autoscaler/values.yaml @@ -244,6 +244,9 @@ extraVolumeSecrets: {} # - key: subkey # path: mypath +# initContainers -- Any additional init containers. +initContainers: [] + # fullnameOverride -- String to fully override `cluster-autoscaler.fullname` template. fullnameOverride: ""