Skip to content

Commit

Permalink
[stable/vpa] Add the ability to specify an envFrom secret (#1386)
Browse files Browse the repository at this point in the history
  • Loading branch information
sudermanjr authored Dec 8, 2023
1 parent 8eada67 commit 1dcf511
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/vpa/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: vpa
description: A Helm chart for Kubernetes Vertical Pod Autoscaler
type: application
version: 3.0.2
version: 3.1.0
appVersion: 0.14.0
maintainers:
- name: sudermanjr
Expand Down
1 change: 1 addition & 0 deletions stable/vpa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ recommender:
| serviceAccount.name | string | `""` | The base name of the service account to use (appended with the component). If not set and create is true, a name is generated using the fullname template and appended for each component |
| serviceAccount.automountServiceAccountToken | bool | `true` | Automount API credentials for the Service Account |
| recommender.enabled | bool | `true` | If true, the vpa recommender component will be installed. |
| recommender.envFromSecret | string | `""` | Specify a secret to get environment variables from |
| recommender.annotations | object | `{}` | Annotations to add to the recommender deployment |
| recommender.extraArgs | object | `{"pod-recommendation-min-cpu-millicores":15,"pod-recommendation-min-memory-mb":100,"v":"4"}` | A set of key-value flags to be passed to the recommender |
| recommender.replicaCount | int | `1` | |
Expand Down
5 changes: 5 additions & 0 deletions stable/vpa/templates/recommender-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ spec:
- name: metrics
containerPort: 8942
protocol: TCP
{{- if .Values.recommender.envFromSecret }}
envFrom:
- secretRef:
name: {{ .Values.recommender.envFromSecret }}
{{- end }}
resources:
{{- toYaml .Values.recommender.resources | nindent 12 }}
{{- with .Values.recommender.nodeSelector }}
Expand Down
2 changes: 2 additions & 0 deletions stable/vpa/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ serviceAccount:
recommender:
# recommender.enabled -- If true, the vpa recommender component will be installed.
enabled: true
# -- Specify a secret to get environment variables from
envFromSecret: ""
# recommender.annotations -- Annotations to add to the recommender deployment
annotations: {}
# recommender.extraArgs -- A set of key-value flags to be passed to the recommender
Expand Down

0 comments on commit 1dcf511

Please sign in to comment.