blob: cd1a6a9fe99f81bbdb8d3ac04b8fb4441730cc74 [file] [log] [blame]
Giorgi Lekveishviliee15ee22024-03-28 12:35:10 +04001{{- $root := . -}}
2
Giorgi Lekveishvilief7f8332024-04-08 19:46:54 +04003{{- if not .Values.gerrit.etc.existingConfigMapName }}
Giorgi Lekveishviliee15ee22024-03-28 12:35:10 +04004apiVersion: v1
5kind: ConfigMap
6metadata:
7 name: {{ .Release.Name }}-gerrit-configmap
8 labels:
9 app.kubernetes.io/component: gerrit
10 app.kubernetes.io/instance: {{ .Release.Name }}
11 chart: {{ template "gerrit.chart" . }}
12 heritage: {{ .Release.Service }}
13 release: {{ .Release.Name }}
14 {{- if .Values.additionalLabels }}
15{{ toYaml .Values.additionalLabels | indent 4 }}
16 {{- end }}
17data:
18 {{- range $key, $value := .Values.gerrit.etc.config }}
19 {{ $key }}:
20{{ toYaml $value | indent 4 }}
21 {{- end }}
22 {{- if not (hasKey .Values.gerrit.etc.config "healthcheck.config") }}
23 healthcheck.config: |-
24 [healthcheck "auth"]
25 # On new instances there may be no users to use for healthchecks
26 enabled = false
27 [healthcheck "querychanges"]
28 # On new instances there won't be any changes to query
29 enabled = false
30 {{- end }}
31---
Giorgi Lekveishvilief7f8332024-04-08 19:46:54 +040032{{- end }}
Giorgi Lekveishviliee15ee22024-03-28 12:35:10 +040033apiVersion: v1
34kind: ConfigMap
35metadata:
36 name: {{ .Release.Name }}-gerrit-init-configmap
37 labels:
38 app.kubernetes.io/component: gerrit
39 app.kubernetes.io/instance: {{ .Release.Name }}
40 chart: {{ template "gerrit.chart" . }}
41 heritage: {{ .Release.Service }}
42 release: {{ .Release.Name }}
43 {{- if .Values.additionalLabels }}
44{{ toYaml .Values.additionalLabels | indent 4 }}
45 {{- end }}
46data:
47 gerrit-init.yaml: |-
48 {{ if .Values.caCert -}}
49 caCertPath: /var/config/ca.crt
50 {{- end }}
51 pluginCacheEnabled: {{ .Values.gerrit.pluginManagement.cache.enabled }}
52 pluginCacheDir: /var/mnt/plugins
53 {{- if .Values.gerrit.pluginManagement.plugins }}
54 plugins:
55{{ toYaml .Values.gerrit.pluginManagement.plugins | indent 6}}
56 {{- end }}
57 {{- if .Values.gerrit.pluginManagement.libs }}
58 libs:
59{{ toYaml .Values.gerrit.pluginManagement.libs | indent 6}}
60 {{- end }}
61{{- range .Values.gerrit.additionalConfigMaps -}}
62{{- if .data }}
63---
64apiVersion: v1
65kind: ConfigMap
66metadata:
67 name: {{ $root.Release.Name }}-{{ .name }}
68 labels:
69 app.kubernetes.io/component: gerrit
70 app.kubernetes.io/instance: {{ $root.Release.Name }}
71 chart: {{ template "gerrit.chart" $root }}
72 heritage: {{ $root.Release.Service }}
73 release: {{ $root.Release.Name }}
74 {{- if $root.Values.additionalLabels }}
75{{ toYaml $root.Values.additionalLabels | indent 4 }}
76 {{- end }}
77data:
78{{ toYaml .data | indent 2 }}
79{{- end }}
80{{- end }}