{{- if .Values.server.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "model-registry.configMap.name" . }}
  labels:
    {{- include "model-registry.labels" . | nindent 4 }}
    app.kubernetes.io/component: server
    component: model-registry-server
  {{- with .Values.commonAnnotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
data:
  MODEL_REGISTRY_REST_SERVICE_HOST: {{ include "model-registry.service.name" . | quote }}
  MODEL_REGISTRY_REST_SERVICE_PORT: {{ .Values.server.rest.port | quote }}
  MODEL_REGISTRY_GRPC_SERVICE_HOST: {{ include "model-registry.service.name" . | quote }}
  MODEL_REGISTRY_GRPC_SERVICE_PORT: {{ .Values.server.grpc.port | quote }}
  MODEL_REGISTRY_DATA_STORE_TYPE: {{ .Values.server.dataStoreType | quote }}
  {{- range $key, $value := .Values.configMap.data }}
  {{ $key }}: {{ $value | quote }}
  {{- end }}
{{- end }} 