{{- if .Values.kubeconfig.enabled -}} apiVersion: v1 kind: Secret metadata: name: {{ template "kube-state-metrics.fullname" . }}-kubeconfig namespace: {{ template "kube-state-metrics.namespace" . }} labels: {{- include "kube-state-metrics.labels" . | indent 4 }} type: Opaque data: config: '{{ .Values.kubeconfig.secret }}' {{- end -}}