rancher-partner-charts/charts/stackstate/stackstate-k8s-agent/templates/cluster-agent-configmap.yaml

29 lines
1.0 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-cluster-agent
labels:
{{ include "stackstate-k8s-agent.labels" . | indent 4 }}
app.kubernetes.io/component: cluster-agent
data:
kubernetes_api_events_conf: |
init_config:
instances:
- collect_events: {{ .Values.clusterAgent.collection.kubernetesEvents }}
event_categories:{{ .Values.clusterAgent.config.events.categories | toYaml | nindent 10 }}
kubernetes_api_topology_conf: |
init_config:
instances:
- collection_interval: {{ .Values.clusterAgent.config.topology.collectionInterval }}
resources:{{ .Values.clusterAgent.collection.kubernetesResources | toYaml | nindent 10 }}
{{- if .Values.clusterAgent.collection.kubeStateMetrics.enabled }}
kube_state_metrics_core_conf: |
{{- include "cluster-agent-kube-state-metrics" . | nindent 6 }}
{{- end }}
{{- if .Values.clusterAgent.config.override }}
{{- range .Values.clusterAgent.config.override }}
{{ .path | replace "/" "_"}}_{{ .name }}: |
{{ .data | indent 4 -}}
{{- end -}}
{{- end -}}