Skip to content

Commit

Permalink
[kube-state-metrics] add additional environment variables support.
Browse files Browse the repository at this point in the history
Signed-off-by: Lan Liang <[email protected]>
  • Loading branch information
liangyuanpeng committed Dec 27, 2024
1 parent eb7ab52 commit d0809fe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions charts/kube-state-metrics/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,18 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.env }}
{{- toYaml .Values.env | nindent 8 }}
{{- end }}

{{ else }}
{{- if .Values.env }}
env:
{{- toYaml .Values.env | nindent 8 }}
{{- end }}

{{- end }}

args:
{{- if .Values.extraArgs }}
{{- .Values.extraArgs | toYaml | nindent 8 }}
Expand Down
7 changes: 7 additions & 0 deletions charts/kube-state-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ serviceAccount:
# If false then the user will opt out of automounting API credentials.
automountServiceAccountToken: true

# Additional Environment variables
env: {}
# - name: GOMAXPROCS
# valueFrom:
# resourceFieldRef:
# resource: limits.cpu

prometheus:
monitor:
enabled: false
Expand Down

0 comments on commit d0809fe

Please sign in to comment.