apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "sonarqube.fullname" . }}-init-fs
  labels:
    app: {{ template "sonarqube.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
data:
  init_fs.sh: |-
    {{- if .Values.persistence.enabled }}
    chown -R {{ .Values.persistence.uid }}: {{ .Values.sonarqubeFolder }}
    {{- end }}
