{{- if .Values.additionalCAs.enabled }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "karpenter.fullname" . }}-additional-ca
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "karpenter.labels" . | nindent 4 }}
type: Opaque
data:
  {{- range $filename, $cert := .Values.additionalCAs.certs }}
  {{ $filename }}: {{ $cert | b64enc }}
  {{- end }}
{{- end }}
