Skip to content

Commit

Permalink
Merge pull request #3725 from foriequal0/feature/chart-match-examples
Browse files Browse the repository at this point in the history
Fix cluster-autoscaler chart to match with the examples
  • Loading branch information
k8s-ci-robot authored Jan 24, 2021
2 parents be6bd2f + fa29647 commit ccef700
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/cluster-autoscaler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ name: cluster-autoscaler
sources:
- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
type: application
version: 9.3.2
version: 9.4.0
2 changes: 2 additions & 0 deletions charts/cluster-autoscaler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,9 @@ Though enough for the majority of installations, the default PodSecurityPolicy _
| extraEnv | object | `{}` | Additional container environment variables. |
| extraEnvConfigMaps | object | `{}` | Additional container environment variables from ConfigMaps. |
| extraEnvSecrets | object | `{}` | Additional container environment variables from Secrets. |
| extraVolumeMounts | list | `[]` | Additional volumes to mount. |
| extraVolumeSecrets | object | `{}` | Additional volumes to mount from Secrets. |
| extraVolumes | list | `[]` | Additional volumes. |
| fullnameOverride | string | `""` | String to fully override `cluster-autoscaler.fullname` template. |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| image.pullSecrets | list | `[]` | Image pull secrets |
Expand Down
10 changes: 8 additions & 2 deletions charts/cluster-autoscaler/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ spec:
securityContext:
{{ toYaml .Values.containerSecurityContext | nindent 12 | trim }}
{{- end }}
{{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets }}
{{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets .Values.extraVolumeMounts }}
volumeMounts:
{{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }}
- name: cloudconfig
Expand All @@ -199,6 +199,9 @@ spec:
mountPath: {{ required "Must specify mountPath!" $value.mountPath }}
readOnly: true
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{ toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.affinity }}
affinity:
Expand All @@ -215,7 +218,7 @@ spec:
securityContext:
{{ toYaml .Values.securityContext | nindent 8 | trim }}
{{- end }}
{{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets }}
{{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets .Values.extraVolumes }}
volumes:
{{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }}
- name: cloudconfig
Expand All @@ -236,6 +239,9 @@ spec:
{{- toYaml $value.items | nindent 14 }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 10 }}
{{- end }}
{{- end }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
Expand Down
10 changes: 10 additions & 0 deletions charts/cluster-autoscaler/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,24 @@ rules:
- configmaps
verbs:
- create
{{- if eq (default "" .Values.extraArgs.expander) "priority" }}
- list
- watch
{{- end }}
- apiGroups:
- ""
resources:
- configmaps
resourceNames:
- cluster-autoscaler-status
{{- if eq (default "" .Values.extraArgs.expander) "priority" }}
- cluster-autoscaler-priority-expander
{{- end }}
verbs:
- delete
- get
- update
{{- if eq (default "" .Values.extraArgs.expander) "priority" }}
- watch
{{- end }}
{{- end -}}
12 changes: 12 additions & 0 deletions charts/cluster-autoscaler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,18 @@ extraVolumeSecrets: {}
# - key: subkey
# path: mypath

# extraVolumes -- Additional volumes.
extraVolumes: []
# - name: ssl-certs
# hostPath:
# path: /etc/ssl/certs/ca-bundle.crt

# extraVolumeMounts -- Additional volumes to mount.
extraVolumeMounts: []
# - name: ssl-certs
# mountPath: /etc/ssl/certs/ca-certificates.crt
# readonly: true

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

Expand Down

0 comments on commit ccef700

Please sign in to comment.