apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "harbor.core" . }}
  namespace: {{ .Release.Namespace | quote }}
  labels: {{- include "common.labels.standard" . | nindent 4 }}
    {{- if .Values.commonLabels }}
    {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
    {{- end }}
    app.kubernetes.io/component: core
  {{- if .Values.commonAnnotations }}
  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  {{- end }}
data:
  app.conf: |+
    appname = Harbor
    runmode = prod
    enablegzip = true
    {{- if .Values.core.sessionLifetime }}
    sessiongcmaxlifetime = {{ .Values.core.sessionLifetime }}
    {{- end }}

    [prod]
    httpport = {{ ternary .Values.core.containerPorts.https .Values.core.containerPorts.http .Values.internalTLS.enabled | quote }}
