{{- if and (not .Values.existingSecret) (or .Values.credentialKey .Values.apiKey) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "oversync.fullname" . }}-secrets
  labels:
    {{- include "oversync.labels" . | nindent 4 }}
type: Opaque
stringData:
  {{- if .Values.credentialKey }}
  credential-key: {{ .Values.credentialKey | quote }}
  {{- end }}
  {{- if .Values.apiKey }}
  api-key: {{ .Values.apiKey | quote }}
  {{- end }}
{{- end }}
