Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
add configmap and secret collectors (#10665)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Champ <[email protected]>
  • Loading branch information
myauie authored and k8s-ci-robot committed Jan 15, 2019
1 parent deca61f commit 0af1318
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/kube-state-metrics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- metric
- monitoring
- prometheus
version: 0.12.1
version: 0.12.2
appVersion: 1.4.0
home: https://github.com/kubernetes/kube-state-metrics/
sources:
Expand Down
2 changes: 2 additions & 0 deletions stable/kube-state-metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ $ helm install stable/kube-state-metrics
| `tolerations` | Tolerations for pod assignment | [] |
| `podAnnotations` | Annotations to be added to the pod | {} |
| `resources` | kube-state-metrics resource requests and limits | {} |
| `collectors.configmaps` | Enable the configmaps collector. | true |
| `collectors.cronjobs` | Enable the cronjobs collector. | true |
| `collectors.daemonsets` | Enable the daemonsets collector. | true |
| `collectors.deployments` | Enable the deployments collector. | true |
Expand All @@ -44,5 +45,6 @@ $ helm install stable/kube-state-metrics
| `collectors.replicasets` | Enable the replicasets collector. | true |
| `collectors.replicationcontrollers` | Enable the replicationcontrollers collector. | true |
| `collectors.resourcequotas` | Enable the resourcequotas collector. | true |
| `collectors.secrets` | Enable the secrets collector. | true |
| `collectors.services` | Enable the services collector. | true |
| `collectors.statefulsets` | Enable the statefulsets collector. | true |
12 changes: 12 additions & 0 deletions stable/kube-state-metrics/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ metadata:
release: {{ .Release.Name }}
name: {{ template "kube-state-metrics.fullname" . }}
rules:
{{ if .Values.collectors.configmaps }}
- apiGroups: [""]
resources:
- configmaps
verbs: ["list", "watch"]
{{ end -}}
{{ if .Values.collectors.cronjobs }}
- apiGroups: ["batch"]
resources:
Expand Down Expand Up @@ -99,6 +105,12 @@ rules:
- resourcequotas
verbs: ["list", "watch"]
{{ end -}}
{{ if .Values.collectors.secrets }}
- apiGroups: [""]
resources:
- secrets
verbs: ["list", "watch"]
{{ end -}}
{{ if .Values.collectors.services }}
- apiGroups: [""]
resources:
Expand Down
6 changes: 6 additions & 0 deletions stable/kube-state-metrics/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ spec:
containers:
- name: {{ .Chart.Name }}
args:
{{ if .Values.collectors.configmaps }}
- --collectors=configmaps
{{ end }}
{{ if .Values.collectors.cronjobs }}
- --collectors=cronjobs
{{ end }}
Expand Down Expand Up @@ -76,6 +79,9 @@ spec:
{{ if .Values.collectors.resourcequotas }}
- --collectors=resourcequotas
{{ end }}
{{ if .Values.collectors.secrets }}
- --collectors=secrets
{{ end }}
{{ if .Values.collectors.services }}
- --collectors=services
{{ end }}
Expand Down
2 changes: 2 additions & 0 deletions stable/kube-state-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ podAnnotations: {}
# Available collectors for kube-state-metrics. By default all available
# collectors are enabled.
collectors:
configmaps: true
cronjobs: true
daemonsets: true
deployments: true
Expand All @@ -53,6 +54,7 @@ collectors:
replicasets: true
replicationcontrollers: true
resourcequotas: true
secrets: true
services: true
statefulsets: true

Expand Down

0 comments on commit 0af1318

Please sign in to comment.