Skip to content

Commit 2602307

Browse files
committed
[kube-state-metrics]: add option to set user namespaces
Signed-off-by: AvivGuiser <[email protected]>
1 parent 361db6a commit 2602307

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

charts/kube-state-metrics/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords:
77
- prometheus
88
- kubernetes
99
type: application
10-
version: 6.1.4
10+
version: 6.2.0
1111
# renovate: github-releases=kubernetes/kube-state-metrics
1212
appVersion: 2.16.0
1313
home: https://github.com/kubernetes/kube-state-metrics/

charts/kube-state-metrics/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ spec:
4242
{{ toYaml .Values.podAnnotations | nindent 8 }}
4343
{{- end }}
4444
spec:
45+
{{- if and (semverCompare ">=1.33-0" .Capabilities.KubeVersion.Version) (kindIs "bool" .Values.hostUsers) }}
46+
hostUsers: {{ .Values.hostUsers }}
47+
{{- end }}
4548
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
4649
hostNetwork: {{ .Values.hostNetwork }}
4750
serviceAccountName: {{ template "kube-state-metrics.serviceAccountName" . }}

charts/kube-state-metrics/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ extraArgs: []
5555
# If false then the user will opt out of automounting API credentials.
5656
automountServiceAccountToken: true
5757

58+
# -- Use the host's user namespace available in kubernetes 1.33+.
59+
hostUsers: nil
60+
5861
service:
5962
port: 8080
6063
# Default to clusterIP for backward compatibility

0 commit comments

Comments
 (0)