{{- if and .Values.buildPlane.dynamic.provider.k8s.enabled ( not .Values.buildPlane.dynamic.provider.k8s.existingSecret ) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "pipelines.fullname" . }}-dynamic-buildplane-creds-k8s
  labels:
    {{- include "pipelines.labels" . | nindent 4 }}
type: Opaque
data:
  kubeconfig: {{ .Values.buildPlane.dynamic.provider.k8s.kubeconfig | quote }}
{{- end }}
