63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
{{- define "cluster-agent-kube-state-metrics" -}}
|
|
{{- $kubeRes := .Values.clusterAgent.collection.kubernetesResources }}
|
|
{{- if .Values.clusterAgent.collection.kubeStateMetrics.clusterCheck }}
|
|
cluster_check: true
|
|
{{- end }}
|
|
init_config:
|
|
instances:
|
|
- collectors:
|
|
- nodes
|
|
- pods
|
|
- services
|
|
{{- if $kubeRes.persistentvolumeclaims }}
|
|
- persistentvolumeclaims
|
|
{{- end }}
|
|
{{- if $kubeRes.persistentvolumes }}
|
|
- persistentvolumes
|
|
{{- end }}
|
|
{{- if $kubeRes.namespaces }}
|
|
- namespaces
|
|
{{- end }}
|
|
{{- if $kubeRes.endpoints }}
|
|
- endpoints
|
|
{{- end }}
|
|
{{- if $kubeRes.daemonsets }}
|
|
- daemonsets
|
|
{{- end }}
|
|
{{- if $kubeRes.deployments }}
|
|
- deployments
|
|
{{- end }}
|
|
{{- if $kubeRes.replicasets }}
|
|
- replicasets
|
|
{{- end }}
|
|
{{- if $kubeRes.statefulsets }}
|
|
- statefulsets
|
|
{{- end }}
|
|
{{- if $kubeRes.cronjobs }}
|
|
- cronjobs
|
|
{{- end }}
|
|
{{- if $kubeRes.jobs }}
|
|
- jobs
|
|
{{- end }}
|
|
{{- if $kubeRes.ingresses }}
|
|
- ingresses
|
|
{{- end }}
|
|
{{- if $kubeRes.secrets }}
|
|
- secrets
|
|
{{- end }}
|
|
- resourcequotas
|
|
- replicationcontrollers
|
|
- limitranges
|
|
- horizontalpodautoscalers
|
|
- poddisruptionbudgets
|
|
- storageclasses
|
|
- volumeattachments
|
|
{{- if .Values.clusterAgent.collection.kubeStateMetrics.clusterCheck }}
|
|
skip_leader_election: true
|
|
{{- end }}
|
|
labels_as_tags:
|
|
{{ .Values.clusterAgent.collection.kubeStateMetrics.labelsAsTags | toYaml | indent 8 }}
|
|
annotations_as_tags:
|
|
{{ .Values.clusterAgent.collection.kubeStateMetrics.annotationsAsTags | toYaml | indent 8 }}
|
|
{{- end -}}
|