apiVersion: v1
kind: Namespace
metadata:
  name: {{ .Values.global.namespace }}
  labels:
    {{- include "clawith.labels" . | nindent 4 }}
{{- if .Values.secrets.create }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "clawith.fullname" . }}-secrets
  namespace: {{ .Values.global.namespace }}
  labels:
    {{- include "clawith.labels" . | nindent 4 }}
type: Opaque
stringData:
  secret-key: {{ .Values.backend.secrets.secretKey | quote }}
  jwt-secret-key: {{ .Values.backend.secrets.jwtSecretKey | quote }}
{{- end }}

