Skip to content

Commit df4f6cd

Browse files
Use existing secrets for peerdb and peerdbUI password as well as nextauth. (#32)
* Update templates, values and readme to support providing your own secrets for peerdb.credentials.password, peerdbUI.credentials.password and peerdbUI.credentials.nexauth * Update chart version to 0.9.1 per checklist * Return datadog.enabled back to existing value * Implement condition simplifications. * chore: update docs --------- Co-authored-by: Kunal Gupta <[email protected]>
1 parent 8ed4342 commit df4f6cd

File tree

8 files changed

+33
-4
lines changed

8 files changed

+33
-4
lines changed

peerdb-catalog/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type: application
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 0.9.0
16+
version: 0.9.1
1717
# This is the version number of the application being deployed. This version number should be
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.

peerdb-catalog/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# peerdb-catalog
22

3-
![Version: 0.9.0](https://img.shields.io/badge/Version-0.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.30.9](https://img.shields.io/badge/AppVersion-v0.30.9-informational?style=flat-square)
3+
![Version: 0.9.1](https://img.shields.io/badge/Version-0.9.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.30.9](https://img.shields.io/badge/AppVersion-v0.30.9-informational?style=flat-square)
44

55
A Helm chart for Kubernetes
66

peerdb/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type: application
2525
# This is the chart version. This version number should be incremented each time you make changes
2626
# to the chart and its templates, including the app version.
2727
# Versions are expected to follow Semantic Versioning (https://semver.org/)
28-
version: 0.9.0
28+
version: 0.9.1
2929
# This is the version number of the application being deployed. This version number should be
3030
# incremented each time you make changes to the application. Versions are not expected to
3131
# follow Semantic Versioning. They should reflect the version the application is using.

peerdb/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# peerdb
22

3-
![Version: 0.9.0](https://img.shields.io/badge/Version-0.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.30.9](https://img.shields.io/badge/AppVersion-v0.30.9-informational?style=flat-square)
3+
![Version: 0.9.1](https://img.shields.io/badge/Version-0.9.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.30.9](https://img.shields.io/badge/AppVersion-v0.30.9-informational?style=flat-square)
44

55
Install PeerDB along with Temporal.
66

@@ -154,6 +154,7 @@ Install PeerDB along with Temporal.
154154
| global.peerdb.lowCost.nodeSelector | object | `{}` | Node selector that will be applied to all the lowCost=true peerdb components additively |
155155
| global.peerdb.lowCost.tolerations | list | `[]` | Tolerations that will be applied to all the lowCost=true peerdb components additively |
156156
| peerdb.credentials.password | string | `"peerdb"` | |
157+
| peerdb.credentials.passwordExistingSecret | string | `""` | Use this existing secret for PeerDB Server Password. Must have `SERVER_PEERDB_PASSWORD` key. |
157158
| peerdb.deployment.annotations | object | `{}` | annotations that will be applied to the peerdb-server deployment, NOT the pods |
158159
| peerdb.deployment.labels | object | `{}` | labels that will be applied to the peerdb-server deployment, NOT the pods |
159160
| peerdb.enabled | bool | `true` | |
@@ -181,8 +182,10 @@ Install PeerDB along with Temporal.
181182
| peerdb.service.targetPort | int | `9900` | |
182183
| peerdb.service.type | string | `"ClusterIP"` | |
183184
| peerdb.version | string | `"stable-v0.30.9"` | This version is overridden by .env file if the install_peerdb.sh script is being used In that case, either update the .env file or override it via values.customer.yaml when installing |
185+
| peerdbUI.credentials.nexauthExistingSecret | string | `""` | Use this existing secret for nexauth_secret. Must have `UI_NEXTAUTH_SECRET` key. |
184186
| peerdbUI.credentials.nexauth_secret | string | `""` | |
185187
| peerdbUI.credentials.password | string | `"_PEERDB_PASSWORD_"` | |
188+
| peerdbUI.credentials.passwordExistingSecret | string | `""` | Use this existing secret for PeerDB UI Password. Must have `UI_PEERDB_PASSWORD` key. |
186189
| peerdbUI.deployment.annotations | object | `{}` | annotations that will be applied to the peerdbUI deployment, NOT the pods |
187190
| peerdbUI.deployment.labels | object | `{}` | labels that will be applied to the peerdbUI deployment, NOT the pods |
188191
| peerdbUI.enabled | bool | `true` | |

peerdb/templates/peerdb-server-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ spec:
5353
valueFrom:
5454
secretKeyRef:
5555
key: SERVER_PEERDB_PASSWORD
56+
{{- if .Values.peerdb.credentials.passwordExistingSecret }}
57+
name: {{ .Values.peerdb.credentials.passwordExistingSecret }}
58+
{{- else }}
5659
name: peerdb-server-ui-secret
60+
{{- end }}
5761
# flow server config
5862
- name: PEERDB_FLOW_SERVER_ADDRESS
5963
value: "http://flow-api:{{ .Values.flowApi.service.port }}"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
{{- if not (and (.Values.peerdbUI.credentials.passwordExistingSecret .Values.peerdb.credentials.passwordExistingSecret .Values.peerdbUI.credentials.nexauthExistingSecret)) }}
12
apiVersion: v1
23
kind: Secret
34
metadata:
45
name: peerdb-server-ui-secret
56
labels:
67
{{- include "peerdb.common.labels" . | nindent 4 }}
78
stringData:
9+
{{- if not .Values.peerdbUI.credentials.passwordExistingSecret }}
810
UI_PEERDB_PASSWORD: '{{ .Values.peerdbUI.credentials.password }}'
11+
{{- end }}
12+
{{- if not .Values.peerdb.credentials.passwordExistingSecret }}
913
SERVER_PEERDB_PASSWORD: '{{ .Values.peerdb.credentials.password }}'
14+
{{- end }}
15+
{{- if not .Values.peerdbUI.credentials.nexauthExistingSecret }}
1016
UI_NEXTAUTH_SECRET: '{{ .Values.peerdbUI.credentials.nexauth_secret | default (randAlphaNum 60) }}'
17+
{{- end }}
18+
{{- end }}

peerdb/templates/peerdb-ui-deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,20 @@ spec:
5757
valueFrom:
5858
secretKeyRef:
5959
key: UI_PEERDB_PASSWORD
60+
{{- if .Values.peerdbUI.credentials.passwordExistingSecret }}
61+
name: {{ .Values.peerdbUI.credentials.passwordExistingSecret }}
62+
{{- else }}
6063
name: peerdb-server-ui-secret
64+
{{- end }}
6165
- name: NEXTAUTH_SECRET
6266
valueFrom:
6367
secretKeyRef:
6468
key: UI_NEXTAUTH_SECRET
69+
{{- if .Values.peerdbUI.credentials.nexauthExistingSecret }}
70+
name: {{ .Values.peerdbUI.credentials.nexauthExistingSecret }}
71+
{{- else }}
6572
name: peerdb-server-ui-secret
73+
{{- end }}
6674
- name: NEXTAUTH_URL
6775
value: {{ .Values.peerdbUI.service.url }}
6876
{{- with .Values.peerdbUI.extraEnv -}}

peerdb/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,11 @@ peerdbUI:
205205
enabled: true
206206
credentials:
207207
password: _PEERDB_PASSWORD_
208+
# -- Use this existing secret for PeerDB UI Password. Must have `UI_PEERDB_PASSWORD` key.
209+
passwordExistingSecret: ''
208210
nexauth_secret: ''
211+
# -- Use this existing secret for nexauth_secret. Must have `UI_NEXTAUTH_SECRET` key.
212+
nexauthExistingSecret: ''
209213
extraEnv: []
210214
lowCost: true
211215
pods:
@@ -316,6 +320,8 @@ peerdb:
316320
logDir: "/var/log/peerdb"
317321
credentials:
318322
password: "peerdb"
323+
# -- Use this existing secret for PeerDB Server Password. Must have `SERVER_PEERDB_PASSWORD` key.
324+
passwordExistingSecret: ''
319325
resources:
320326
requests:
321327
cpu: 0.1

0 commit comments

Comments
 (0)