blob: 1375c79988b9fca3a72071b620f88b5091325fbc [file] [log] [blame]
{{- $root := . -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-gerrit-configmap
labels:
app: gerrit
chart: {{ template "gerrit.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
{{- range $key, $value := .Values.gerrit.etc.config }}
{{ $key }}:
{{ toYaml $value | indent 4 }}
{{- end }}
{{- if not (hasKey .Values.gerrit.etc.config "healthcheck.config") }}
healthcheck.config: |-
[healthcheck "auth"]
# On new instances there may be no users to use for healthchecks
enabled = false
[healthcheck "querychanges"]
# On new instances there won't be any changes to query
enabled = false
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-gerrit-init-configmap
labels:
app: gerrit
chart: {{ template "gerrit.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
gerrit-init.yaml: |-
{{ if .Values.caCert -}}
caCertPath: /var/config/ca.crt
{{- end }}
pluginCache: {{ .Values.gerrit.plugins.cache.enabled }}
pluginCacheDir: /var/mnt/plugins
{{- if .Values.gerrit.plugins.packaged }}
packagedPlugins:
{{ toYaml .Values.gerrit.plugins.packaged | indent 6}}
{{- end }}
{{- if .Values.gerrit.plugins.downloaded }}
downloadedPlugins:
{{ toYaml .Values.gerrit.plugins.downloaded | indent 6 }}
{{- end }}
{{- if .Values.gerrit.plugins.installAsLibrary }}
installAsLibrary:
{{ toYaml .Values.gerrit.plugins.installAsLibrary | indent 6 }}
{{- end }}
{{- range .Values.gerrit.additionalConfigMaps -}}
{{- if .data }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $root.Release.Name }}-{{ .name }}
labels:
app: gerrit
chart: {{ template "gerrit.chart" $root }}
heritage: {{ $root.Release.Service }}
release: {{ $root.Release.Name }}
data:
{{ toYaml .data | indent 2 }}
{{- end }}
{{- end }}