Skip to content

Commit

Permalink
[kube-state-metrics] - Add option to only use the release namespace
Browse files Browse the repository at this point in the history
Signed-off-by: birca <birca@adobe.com>
  • Loading branch information
Allex1 committed Jul 21, 2022
1 parent 4ada0e2 commit 02121f4
Show file tree
Hide file tree
Showing 3 changed files with 7 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: 4.13.0
version: 4.13.1
appVersion: 2.5.0
home: https://github.com/kubernetes/kube-state-metrics/
sources:
Expand Down
3 changes: 3 additions & 0 deletions charts/kube-state-metrics/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ spec:
{{- if .Values.namespacesDenylist }}
- --namespaces-denylist={{ tpl (.Values.namespacesDenylist | join ",") $ }}
{{- end }}
{{- if .Values.releaseNamespace }}
- --namespaces={{ template "kube-state-metrics.namespace" . }}
{{- end }}
{{- if .Values.autosharding.enabled }}
- --pod=$(POD_NAME)
- --pod-namespace=$(POD_NAMESPACE)
Expand Down
3 changes: 3 additions & 0 deletions charts/kube-state-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ namespaces: ""
# only namespaces that are excluded in namespaces-denylist will be used.
namespacesDenylist: ""

# Enable only the release namespace for collecting resources.
releaseNamespace: false

## Override the deployment namespace
##
namespaceOverride: ""
Expand Down

0 comments on commit 02121f4

Please sign in to comment.