Skip to content

Commit

Permalink
[kube-state-metrics] add additional environment variables support. (#…
Browse files Browse the repository at this point in the history
…5101)

Signed-off-by: Lan <[email protected]>
  • Loading branch information
liangyuanpeng authored Dec 30, 2024
1 parent 5710cd2 commit 1f46261
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/kube-state-metrics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords:
- prometheus
- kubernetes
type: application
version: 5.27.1
version: 5.28.0
appVersion: 2.14.0
home: https://github.com/kubernetes/kube-state-metrics/
sources:
Expand Down
8 changes: 8 additions & 0 deletions charts/kube-state-metrics/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ 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 }}
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 1f46261

Please sign in to comment.