{{- if .Values.dataintegration.enabled }}
---
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "cmem.name-di" . }}
  labels:
    {{- include "cmem.labels-di" . | nindent 4 }}
type: Opaque
stringData:
  DATAINTEGRATION_PASSWORD_CRYPT_KEY: {{ .Values.dataintegration.config.passwordCryptKey }}
  DATAINTEGRATION_PLAY_HTTP_SECRET: {{ .Values.dataintegration.config.playHTTPSecret }}
  DATAINTEGRATION_CMEM_SERVICE_CLIENT_SECRET: {{ .Values.global.cmemClientSecret }}
  DATAINTEGRATION_CMEM_SERVICE_CLIENT: {{ .Values.global.cmemClientId }}
  {{- if .Values.dataintegration.config.mappingCreator.enabled }}
  DATAINTEGRATION_AI_APIKEY: {{ .Values.dataintegration.config.mappingCreator.AiApiKey }}
  {{- end}}
  {{- if eq .Values.dataintegration.config.workspaceRepository.plugin "projectS3" "s3" }}
  DATAINTEGRATION_WORKSPACEREPO_S3_ACCESSKEY: {{ .Values.dataintegration.config.workspaceRepository.s3.accessKeyId }}
  DATAINTEGRATION_WORKSPACEREPO_S3_SECRETKEY: {{ .Values.dataintegration.config.workspaceRepository.s3.secretKey }}
  {{- end }}
{{- end }}