Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra EnvVars, VolumeMounts, Volumes and InitContainers to the STS #181

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.swp
*.tgz
.idea/
2 changes: 1 addition & 1 deletion couchdb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: couchdb
version: 4.5.6
version: 4.5.7
appVersion: 3.3.3
description: A database featuring seamless multi-master sync, that scales from
big data to mobile, with an intuitive HTTP/JSON API and designed for
Expand Down
7 changes: 7 additions & 0 deletions couchdb/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# NEWS

## 4.5.7

- Add `extraEnvVars` to the `couchdb` container in the StatefulSet.
- Add `extraVolumeMounts` to the `couchdb` container in the StatefulSet
- Add `extraVolumes` to the StatefulSet
- Add `extraInitContainers` to the StatefulSet

## 4.5.6

- Add `extraPorts` to the network policy when the network policy is enabled.
Expand Down
176 changes: 90 additions & 86 deletions couchdb/README.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions couchdb/requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.20.4
digest: sha256:73045308add144761f12bc13cbad9fddcdce25c6919140e0683d18622bf56ba0
generated: "2024-07-12T14:35:04.405255+02:00"
6 changes: 6 additions & 0 deletions couchdb/requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
tags:
- bitnami-common
version: 2.x.x
12 changes: 12 additions & 0 deletions couchdb/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ spec:
resources:
{{ toYaml .Values.initResources | indent 12 }}
{{- end }}
{{- if .Values.extraInitContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraInitContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: couchdb
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down Expand Up @@ -129,6 +132,9 @@ spec:
key: erlangCookie
- name: ERL_FLAGS
value: "{{ range $k, $v := .Values.erlangFlags }} -{{ $k }} {{ $v }} {{ end }}"
{{- if .Values.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
{{- if .Values.couchdbConfig.chttpd.require_valid_user }}
Expand Down Expand Up @@ -178,6 +184,9 @@ spec:
{{- end }}
- name: database-storage
mountPath: /opt/couchdb/data
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 10 }}
{{- end }}
{{- if .Values.containerSecurityContext }}
securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -226,6 +235,9 @@ spec:
- key: prometheusinifile
path: prometheus.ini
{{- end }}
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" ( dict "value" .Values.extraVolumes "context" $ ) | nindent 8 }}
{{- end }}

{{- if .Values.adminHash }}
- name: local-config-storage
Expand Down
22 changes: 22 additions & 0 deletions couchdb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ initImage:
tag: latest
pullPolicy: Always

## Define extra init containers here. E.g. for copying custom configuration files
extraInitContainers: []

## CouchDB is happy to spin up cluster nodes in parallel, but if you encounter
## problems you can try setting podManagementPolicy to the StatefulSet default
## `OrderedReady`
Expand Down Expand Up @@ -167,6 +170,25 @@ extraPorts: []
# - name: sqs
# containerPort: 4984

## Additional environment variables to set in the CouchDB container
extraEnvVars: []
# - name: MY_ENV_VAR
# value: my-env-var-value

## If you need to mount extra volumes on the CouchDB container
extraVolumeMounts:
# - name: limits-config
# mountPath: /etc/security/limits.d

## Define extra volumes for the StatefulSet here
extraVolumes:
# - name: limits-config
# configMap:
# name: limits-config
# items:
# - key: 100-couchdb
# path: 100-couchdb.conf

## An Ingress resource can provide name-based virtual hosting and TLS
## termination among other things for CouchDB deployments which are accessed
## from outside the Kubernetes cluster.
Expand Down