{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}

{{- if and .Values.controlplane.keylessSigning.enabled (eq "fileCA" .Values.controlplane.keylessSigning.backend) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "chainloop.controlplane.fullname" . }}-keyless-file-ca
  labels:
    {{- include "chainloop.controlplane.labels" . | nindent 4 }}
type: Opaque
data:
  file_ca.cert: {{ .Values.controlplane.keylessSigning.fileCA.cert | b64enc | quote }}
  file_ca.key: {{ .Values.controlplane.keylessSigning.fileCA.key | b64enc | quote }}
{{- end }}
