Skip to content

Commit 463b411

Browse files
authored
Support extra secrets (#185)
Adds support for ExternalSecrets or secrets that are generated other than from the chart itself. This is useful for those who may be managing secrets with other services, such as Hashicorp Vault or OpenBao.
1 parent a1dfd8b commit 463b411

File tree

6 files changed

+25
-14
lines changed

6 files changed

+25
-14
lines changed

couchdb/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
22
name: couchdb
3-
version: 4.5.6
3+
version: 4.5.7
44
appVersion: 3.3.3
55
description: A database featuring seamless multi-master sync, that scales from
66
big data to mobile, with an intuitive HTTP/JSON API and designed for

couchdb/NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# NEWS
22

3+
## 4.5.7
4+
5+
- Add support for extra secrets not created by the chart, such as Hashicorp Vault or OpenBao.
6+
37
## 4.5.6
48

59
- Add `extraPorts` to the network policy when the network policy is enabled.

couchdb/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CouchDB
22

3-
![Version: 4.5.3](https://img.shields.io/badge/Version-4.5.3-informational?style=flat-square) ![AppVersion: 3.3.3](https://img.shields.io/badge/AppVersion-3.3.3-informational?style=flat-square)
3+
![Version: 4.5.7](https://img.shields.io/badge/Version-4.5.7-informational?style=flat-square) ![AppVersion: 3.3.3](https://img.shields.io/badge/AppVersion-3.3.3-informational?style=flat-square)
44

55
Apache CouchDB is a database featuring seamless multi-master sync, that scales
66
from big data to mobile, with an intuitive HTTP/JSON API and designed for
@@ -18,7 +18,7 @@ storage volumes to each Pod in the Deployment.
1818
```bash
1919
$ helm repo add couchdb https://apache.github.io/couchdb-helm
2020
$ helm install couchdb/couchdb \
21-
--version=4.5.3 \
21+
--version=4.5.7 \
2222
--set allowAdminParty=true \
2323
--set couchdbConfig.couchdb.uuid=$(curl https://www.uuidgenerator.net/api/version4 2>/dev/null | tr -d -)
2424
```
@@ -44,7 +44,7 @@ Afterwards install the chart replacing the UUID
4444
```bash
4545
$ helm install \
4646
--name my-release \
47-
--version=4.5.3 \
47+
--version=4.5.7 \
4848
--set couchdbConfig.couchdb.uuid=decafbaddecafbaddecafbaddecafbad \
4949
couchdb/couchdb
5050
```
@@ -78,7 +78,7 @@ and then install the chart while overriding the `createAdminSecret` setting:
7878
```bash
7979
$ helm install \
8080
--name my-release \
81-
--version=4.5.3 \
81+
--version=4.5.7 \
8282
--set createAdminSecret=false \
8383
--set couchdbConfig.couchdb.uuid=decafbaddecafbaddecafbaddecafbad \
8484
couchdb/couchdb
@@ -133,7 +133,7 @@ version semantics. You can upgrade directly from `stable/couchdb` to this chart
133133

134134
```bash
135135
$ helm repo add couchdb https://apache.github.io/couchdb-helm
136-
$ helm upgrade my-release --version=4.5.3 couchdb/couchdb
136+
$ helm upgrade my-release --version=4.5.7 couchdb/couchdb
137137
```
138138

139139
## Configuration
@@ -170,6 +170,9 @@ A variety of other parameters are also configurable. See the comments in the
170170
| `adminUsername` | admin |
171171
| `adminPassword` | auto-generated |
172172
| `adminHash` | |
173+
| `extraSecretName` | "" (the name of a secret resource to provide e.g. admin credentials from an ExternalSecret/vault/etc.) |
174+
| `adminUsernameKey` | "" (the string/key to access the admin username secret from an extra secret if different from "adminUsername" |
175+
| `adminPasswordKey` | "" (the string/key to access the admin password secret from an extra secret if different from "adminPassword" |
173176
| `cookieAuthSecret` | auto-generated |
174177
| `extraPorts` | [] (a list of ContainerPort objects) |
175178
| `image.repository` | couchdb |

couchdb/templates/job.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ spec:
4040
- name: COUCHDB_ADMIN
4141
valueFrom:
4242
secretKeyRef:
43-
name: {{ template "couchdb.fullname" . }}
44-
key: adminUsername
43+
name: {{ .Values.extraSecretName | default (include "couchdb.fullname" .) }}
44+
key: {{ .Values.adminUsernameKey | default "adminUsername" }}
4545
- name: COUCHDB_PASS
4646
valueFrom:
4747
secretKeyRef:
48-
name: {{ template "couchdb.fullname" . }}
49-
key: adminPassword
48+
name: {{ .Values.extraSecretName | default (include "couchdb.fullname" .) }}
49+
key: {{ .Values.adminPasswordKey | default "adminPassword" }}
5050
{{- if .Values.containerSecurityContext }}
5151
securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 12 }}
5252
{{- end }}

couchdb/templates/statefulset.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ spec:
109109
- name: COUCHDB_USER
110110
valueFrom:
111111
secretKeyRef:
112-
name: {{ template "couchdb.fullname" . }}
113-
key: adminUsername
112+
name: {{ .Values.extraSecretName | default (include "couchdb.fullname" .) }}
113+
key: {{ .Values.adminUsernameKey | default "adminUsername" }}
114114
- name: COUCHDB_PASSWORD
115115
valueFrom:
116116
secretKeyRef:
117-
name: {{ template "couchdb.fullname" . }}
118-
key: adminPassword
117+
name: {{ .Values.extraSecretName | default (include "couchdb.fullname" .) }}
118+
key: {{ .Values.adminPasswordKey | default "adminPassword" }}
119119
- name: COUCHDB_SECRET
120120
valueFrom:
121121
secretKeyRef:

couchdb/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ autoSetup:
3636
# 2) This flag can be disabled and a Secret with the required keys can be
3737
# created ahead of time.
3838
createAdminSecret: true
39+
# defaults to chart name
40+
extraSecretName: ""
41+
adminUsernameKey: ""
42+
adminPasswordKey: ""
3943

4044
adminUsername: admin
4145
# adminPassword: this_is_not_secure

0 commit comments

Comments
 (0)