{{- if and .Values.kubeconfig.enabled .Values.kubeconfig.createSecret }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "k8s-pulse.kubeconfigSecretName" . }}
  labels:
    {{- include "k8s-pulse.labels" . | nindent 4 }}
type: Opaque
stringData:
  {{ .Values.kubeconfig.secretKey | default "config" }}: |
    {{- .Values.kubeconfig.content | nindent 4 }}
{{- end }}
