Skip to content

Commit

Permalink
feat: allow setting init containers for cluster-autoscaler
Browse files Browse the repository at this point in the history
Signed-off-by: Henrik Gerdes <[email protected]>
  • Loading branch information
hegerdes committed Sep 8, 2024
1 parent cecb34c commit 15f159e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/cluster-autoscaler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ vpa:
| image.pullSecrets | list | `[]` | Image pull secrets |
| image.repository | string | `"registry.k8s.io/autoscaling/cluster-autoscaler"` | Image repository |
| image.tag | string | `"v1.30.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. |
Expand Down
4 changes: 4 additions & 0 deletions charts/cluster-autoscaler/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
3 changes: 3 additions & 0 deletions charts/cluster-autoscaler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ extraVolumeSecrets: {}
# - key: subkey
# path: mypath

# initContainers -- Any additional init containers.
initContainers: []

# fullnameOverride -- String to fully override `cluster-autoscaler.fullname` template.
fullnameOverride: ""

Expand Down

0 comments on commit 15f159e

Please sign in to comment.