{{- if .Values.enabled }}
{{- $namespace := .Release.Namespace -}}
{{- $applicationName := .Values.appName -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ $applicationName }}-cm
  namespace: {{ $namespace }}
  labels:
    {{- include "uavcloud-middleware.nacos.labels.standard" . | nindent 4 }}
data:
  mysql.db.name: "{{ .Values.database.db_name }}"
  mysql.db.host: "{{ .Values.database.host }}"
  mysql.port: "{{ .Values.database.port }}"
  mysql.user: "{{ .Values.database.username }}"
  mysql.password: "{{ .Values.database.password }}"
---
{{- end }}
