File tree Expand file tree Collapse file tree 7 files changed +22
-17
lines changed
Expand file tree Collapse file tree 7 files changed +22
-17
lines changed Original file line number Diff line number Diff line change @@ -2,5 +2,5 @@ apiVersion: v2
22name : edgedb
33description : A Helm chart for self hosting EdgeDB
44type : application
5- version : 0.1.1
5+ version : 0.1.2
66appVersion : " 5.6"
Original file line number Diff line number Diff line change @@ -46,14 +46,7 @@ This is useful in case a postgres operator is creating the database for you and
4646
4747### Security Configuration
4848#### Server Password
49- By default, the chart generates a random password. You can provide your own password using a secret:
50- ` ` ` yaml
51- security :
52- password :
53- secret :
54- name : my-edgedb-secret
55- key : password
56- ` ` `
49+ By default, the chart generates a random password as a secret.
5750
5851#### TLS Configuration
5952
Original file line number Diff line number Diff line change @@ -51,6 +51,17 @@ app.kubernetes.io/instance: {{ .Release.Name }}
5151{{- end }}
5252
5353
54+ {{/*
55+ Get the server password value
56+ */ }}
57+ {{- define " edgedb.serverPassword" -}}
58+ {{- if .Values.security.password }}
59+ {{- .Values.security.password.secret.name }}
60+ {{- else }}
61+ {{- include " edgedb.fullname" . }}-server-password
62+ {{- end }}
63+ {{- end }}
64+
5465{{- define " edgedb.tlsSecretName" }}
5566{{- if .Values.security.tls.enabled }}
5667 {{- if .Values.security.tls.secret }}
Original file line number Diff line number Diff line change 11apiVersion : apps/v1
2- kind : Deployment
2+ kind : StatefulSet
33metadata :
44 name : {{ include "edgedb.fullname" . }}
55 labels :
Original file line number Diff line number Diff line change @@ -3,9 +3,14 @@ apiVersion: v1
33kind : Secret
44metadata :
55 name : {{ include "edgedb.fullname" . }}-server-password
6+ annotations :
7+ " helm.sh/hook " : pre-install
8+ " helm.sh/hook-weight " : " -5"
9+ " helm.sh/hook-delete-policy " : before-hook-creation
610 labels :
711 {{- include "edgedb.labels" . | nindent 4 }}
812type : Opaque
913data :
10- password : {{ randAlphaNum 20 | b64enc | quote }}
11- {{ end }}
14+ password : {{ $password := randAlphaNum 20 }}{{ $password | b64enc | quote }}
15+ edgedbBackendDsn : {{ printf "edgedb://edgedb:%s@%s.%s.svc.cluster.local:5656" $password (include "edgedb.fullname" .) .Release.Namespace | b64enc | quote }}
16+ {{- end }}
Original file line number Diff line number Diff line change @@ -12,11 +12,6 @@ affinity: {}
1212replicas : 1
1313
1414security :
15- password :
16- # You can provide your own password by referencing a secret, otherwise the chart will create a password
17- # secret:
18- # name: edgedb-user-defined-secret
19- # key: user-defined-key
2015 tls :
2116 enabled : false
2217 # Provide the template for a cert-manager certificate
Original file line number Diff line number Diff line change 88 helm install $1 \
99 charts/$1 \
1010 --namespace $1 \
11+ --values charts/$1/values-example.yaml \
1112 --create-namespace
1213 '' ;
1314 } ;
You can’t perform that action at this time.
0 commit comments