{{- $gm := index .Values "gitea-mirror" -}}
{{- if (empty $gm.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "gitea-mirror.fullname" . }}
  labels:
    {{- include "gitea-mirror.labels" . | nindent 4 }}
type: Opaque
stringData:
  GITHUB_TOKEN: {{ $gm.github.token | quote }}
  GITEA_TOKEN: {{ $gm.gitea.token | quote }}
  ENCRYPTION_SECRET: {{ $gm.core.encryptionSecret | quote }}
{{- end }}
