File tree Expand file tree Collapse file tree 4 files changed +35
-2
lines changed
Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ CouchDB chart and their default values:
5555| Parameter | Description | Default |
5656| ---------------------------------| -------------------------------------------------------| ----------------------------------------|
5757| ` clusterSize ` | The initial number of nodes in the CouchDB cluster | 3 |
58+ | ` couchdbConfig ` | Map allowing override elements of server .ini config | {} |
5859| ` erlangFlags ` | Map of flags supplied to the underlying Erlang VM | name: couchdb, setcookie: monster
5960| ` persistentVolume.enabled ` | Boolean determining whether to attach a PV to each node | false
6061| ` persistentVolume.size ` | If enabled, the size of the persistent volume to attach | 10Gi
@@ -84,5 +85,4 @@ A variety of other parameters are also configurable. See the comments in the
8485
8586## TODO
8687
87- * Enable CouchDB ini file injection via ConfigMaps
8888* Configure administrator account credentials using Secrets
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : ConfigMap
3+ metadata :
4+ name : {{ template "couchdb.fullname" . }}
5+ labels :
6+ app : {{ template "couchdb.name" . }}
7+ chart : " {{ .Chart.Name }}-{{ .Chart.Version }}"
8+ heritage : {{ .Release.Service | quote }}
9+ release : {{ .Release.Name | quote }}
10+ data :
11+ inifile : |
12+ {{ range $section, $settings := .Values.couchdbConfig -}}
13+ {{ printf "[%s]" $section }}
14+ {{ range $key, $value := $settings -}}
15+ {{ printf "%s = %s" $key ($value | toString) }}
16+ {{ end }}
17+ {{ end }}
Original file line number Diff line number Diff line change @@ -47,15 +47,23 @@ spec:
4747 volumeMounts :
4848 - name : database-storage
4949 mountPath : /var/lib/couchdb
50+ - name : config
51+ mountPath : /opt/couchdb/etc/default.d
5052 - name : couchdb-statefulset-assembler
5153 image : " {{ .Values.helperImage.repository }}:{{ .Values.helperImage.tag }}"
5254 imagePullPolicy : {{ .Values.helperImage.pullPolicy }}
5355{{- if .Values.nodeSelector }}
5456 nodeSelector :
5557{{ toYaml .Values.nodeSelector | indent 8 }}
5658{{- end }}
57- {{- if not .Values.persistentVolume.enabled }}
5859 volumes :
60+ - name : config
61+ configMap :
62+ name : {{ template "couchdb.fullname" . }}
63+ items :
64+ - key : inifile
65+ path : chart.ini
66+ {{- if not .Values.persistentVolume.enabled }}
5967 - name : database-storage
6068 emptyDir : {}
6169{{- else }}
Original file line number Diff line number Diff line change @@ -73,3 +73,11 @@ resources: {}
7373erlangFlags :
7474 name : couchdb
7575 setcookie : monster
76+
77+ # # couchdbConfig will override default CouchDB configuration settings.
78+ # # The contents of this map are reformatted into a .ini file laid down
79+ # # by a ConfigMap object.
80+ # # ref: http://docs.couchdb.org/en/latest/config/index.html
81+ couchdbConfig :
82+ # cluster:
83+ # q: 8 # Create 8 shards for each database
You can’t perform that action at this time.
0 commit comments