{{- /*
ConfigMap template - stores non-sensitive configuration
*/ -}}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "user-management.fullname" . }}-config
  labels:
    {{- include "user-management.labels" . | nindent 4 }}
data:
  GIN_MODE: "release"
  TZ: "Asia/Shanghai"
  LOG_LEVEL: {{ .Values.config.logLevel | quote }}
  ADMIN_EMAIL: {{ .Values.config.adminEmail | quote }}
---
{{- /*
Secret template - stores sensitive configuration
*/ -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "user-management.fullname" . }}-config
  labels:
    {{- include "user-management.labels" . | nindent 4 }}
type: Opaque
stringData:
  JWT_SECRET: {{ required "config.jwtSecret is required" .Values.config.jwtSecret | b64enc | quote }}
