Skip to content

Commit c77fca6

Browse files
committed
release gel chart
1 parent 0a2a44c commit c77fca6

File tree

14 files changed

+112
-125
lines changed

14 files changed

+112
-125
lines changed

charts/edgedb/Chart.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

charts/edgedb/templates/password.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

charts/gel/Chart.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
name: gel
3+
description: A Helm chart for self hosting Gel
4+
type: application
5+
version: 0.1.0
6+
appVersion: "6.2"
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# EdgeDB Helm Chart
1+
# Gel Helm Chart
22

3-
This Helm chart deploys EdgeDB on Kubernetes with support for both local storage and PostgreSQL backends.
3+
This Helm chart deploys [Gel](https://www.geldata.com/) on Kubernetes with support for both local storage and PostgreSQL backends.
44

55
## Installation
66

77
```bash
88
helm repo add luk8s https://lur1an.github.io/luk8s
9-
helm install edgedb luk8s/edgedb
9+
helm install gel luk8s/gel
1010
```
1111

1212
## Configuration
@@ -74,17 +74,17 @@ security:
7474
```
7575
The schema for the `cert` field is the same as the [cert-manager Certificate](https://cert-manager.io/docs/usage/certificate/) with the omission of `secretName` and `secretTemplate` which are then filled in by the chart.
7676
### Additional configuration
77-
You can provide additional [environment variables](https://docs.edgedb.com/database/reference/environment) to the EdgeDB container to modify your deployment:
77+
You can provide additional [environment variables](https://docs.geldata.com/database/reference/environment) to the Gel container to modify your deployment:
7878
```yaml
7979
env:
8080
# enables the admin UI
81-
- name: EDGEDB_SERVER_ADMIN_UI
81+
- name: GEL_SERVER_ADMIN_UI
8282
value: enabled
8383
# allow non TLS connections for HTTP clients, useful if all your TLS is over your reverse proxy or cloud LB
84-
- name: EDGEDB_SERVER_ALLOW_INSECURE_HTTP_CLIENTS
84+
- name: GEL_SERVER_ALLOW_INSECURE_HTTP_CLIENTS
8585
value: "1"
8686
```
87-
> **_Note_**: Some environment variables are set automatically by the chart, such as `EDGEDB_SERVER_TLS_*`, `EDGEDB_SERVER_PASSWORD` and `EDGEDB_PORT`.
87+
> **_Note_**: Some environment variables are set automatically by the chart, such as `GEL_SERVER_TLS_*`, `GEL_SERVER_PASSWORD` and `GEL_PORT`.
8888

8989
## Examples
9090
### High-availability setup with [CloudnativePG](https://cloudnative-pg.io/):
@@ -93,15 +93,15 @@ Set up a Postgres cluster with CloudnativePG:
9393
apiVersion: postgresql.cnpg.io/v1
9494
kind: Cluster
9595
metadata:
96-
name: edgedb-postgres
96+
name: gel-postgres
9797
spec:
9898
instances: 2
9999
storage:
100100
size: 30Gi
101101
storageClass: local-path
102102
managed:
103103
roles:
104-
- name: edgedb
104+
- name: gel
105105
superuser: true
106106
createdb: true
107107
createrole: true
@@ -110,35 +110,35 @@ spec:
110110
- postgres
111111
bootstrap:
112112
initdb:
113-
owner: edgedb
114-
database: edgedb
113+
owner: gel
114+
database: gel
115115
```
116-
It seems EdgeDB needs to run on a user that has all privileges, that's why we give it the postgres role.
116+
It seems Gel needs to run on a user that has all privileges, that's why we give it the postgres role.
117117
```yaml
118-
replicas: 2 # Multiple instances of EdgeDB seem to be working fine
118+
replicas: 2 # Multiple instances of Gel seem to be working fine
119119
storage:
120120
enabled: false
121121
postgres:
122122
enabled: true
123123
dsn:
124124
valueFrom:
125125
secretKeyRef:
126-
name: edgedb-postgres-app
126+
name: gel-postgres-app
127127
key: uri
128128
```
129129
To connect to the database from your application set up your environment variables:
130130
```yaml
131131
env:
132-
- name: EDGEDB_PASSWORD
132+
- name: GEL_PASSWORD
133133
valueFrom:
134134
secretKeyRef:
135-
name: edgedb-server-password
135+
name: gel-server-password
136136
key: password
137-
- name: EDGEDB_DSN
138-
value: edgedb://edgedb:${EDGEDB_PASSWORD}@edgedb:5656/main
139-
- name: EDGEDB_CLIENT_TLS_SECURITY
137+
- name: GEL_DSN
138+
value: gel://gel:${GEL_PASSWORD}@gel:5656/main
139+
- name: GEL_CLIENT_TLS_SECURITY
140140
value: insecure
141-
- name: EDGEDB_CLIENT_SECURITY
141+
- name: GEL_CLIENT_SECURITY
142142
value: insecure_dev_mode
143143
```
144-
> **_Note_**: The `EDGEDB_CLIENT_TLS_SECURITY` and `EDGEDB_CLIENT_SECURITY` environment variables are required to connect to the database if you don't use a trusted source for your tls certificates. EdgeDB creates and signs its own TLS certificates if none are provided.
144+
> **_Note_**: The `GEL_CLIENT_TLS_SECURITY` and `GEL_CLIENT_SECURITY` environment variables are required to connect to the database if you don't use a trusted source for your tls certificates. Gel creates and signs its own TLS certificates if none are provided.
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{/*
22
Expand the name of the chart.
33
*/}}
4-
{{- define "edgedb.name" -}}
4+
{{- define "gel.name" -}}
55
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
66
{{- end }}
77

@@ -10,7 +10,7 @@ Create a default fully qualified app name.
1010
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
1111
If release name contains chart name it will be used as a full name.
1212
*/}}
13-
{{- define "edgedb.fullname" -}}
13+
{{- define "gel.fullname" -}}
1414
{{- if .Values.fullnameOverride }}
1515
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
1616
{{- else }}
@@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
2626
{{/*
2727
Create chart name and version as used by the chart label.
2828
*/}}
29-
{{- define "edgedb.chart" -}}
29+
{{- define "gel.chart" -}}
3030
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
3131
{{- end }}
3232

3333
{{/*
3434
Common labels
3535
*/}}
36-
{{- define "edgedb.labels" -}}
37-
helm.sh/chart: {{ include "edgedb.chart" . }}
38-
{{ include "edgedb.selectorLabels" . }}
36+
{{- define "gel.labels" -}}
37+
helm.sh/chart: {{ include "gel.chart" . }}
38+
{{ include "gel.selectorLabels" . }}
3939
{{- if .Chart.AppVersion }}
4040
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4141
{{- end }}
@@ -45,30 +45,30 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
4545
{{/*
4646
Selector labels
4747
*/}}
48-
{{- define "edgedb.selectorLabels" -}}
49-
app.kubernetes.io/name: {{ include "edgedb.name" . }}
48+
{{- define "gel.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "gel.name" . }}
5050
app.kubernetes.io/instance: {{ .Release.Name }}
5151
{{- end }}
5252

5353

5454
{{/*
5555
Generate or lookup password
5656
*/}}
57-
{{- define "edgedb.password" -}}
58-
{{- $secret := lookup "v1" "Secret" .Release.Namespace (printf "%s-server-password" (include "edgedb.fullname" .)) }}
57+
{{- define "gel.password" -}}
58+
{{- $secret := lookup "v1" "Secret" .Release.Namespace (printf "%s-server-password" (include "gel.fullname" .)) }}
5959
{{- if $secret }}
6060
{{- $secret.data.password | b64dec }}
6161
{{- else }}
6262
{{- randAlphaNum 32 }}
6363
{{- end }}
6464
{{- end }}
6565

66-
{{- define "edgedb.tlsSecretName"}}
66+
{{- define "gel.tlsSecretName"}}
6767
{{- if .Values.security.tls.enabled }}
6868
{{- if .Values.security.tls.secret }}
6969
{{- .Values.security.tls.secret }}
7070
{{- else if .Values.security.tls.cert }}
71-
{{- include "edgedb.fullname" . }}-tls
71+
{{- include "gel.fullname" . }}-tls
7272
{{- else }}
7373
{{- fail "You must provide either a secret or cert for TLS configuration" }}
7474
{{- end }}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
apiVersion: cert-manager.io/v1
88
kind: Certificate
99
metadata:
10-
name: {{ include "edgedb.fullname" . }}-cert
10+
name: {{ include "gel.fullname" . }}-cert
1111
labels:
12-
{{- include "edgedb.labels" . | nindent 4 }}
12+
{{- include "gel.labels" . | nindent 4 }}
1313
spec:
14-
secretName: {{ include "edgedb.tlsSecretName" . }}
14+
secretName: {{ include "gel.tlsSecretName" . }}
1515
secretTemplate:
1616
labels:
17-
{{- include "edgedb.labels" . | nindent 6 }}
17+
{{- include "gel.labels" . | nindent 6 }}
1818
{{ toYaml .Values.security.tls.cert | nindent 2 }}
1919
{{- end }}
2020

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
apiVersion: apps/v1
22
kind: StatefulSet
33
metadata:
4-
name: {{ include "edgedb.fullname" . }}
4+
name: {{ include "gel.fullname" . }}
55
labels:
6-
{{- include "edgedb.labels" . | nindent 4 }}
6+
{{- include "gel.labels" . | nindent 4 }}
77
spec:
88
replicas: {{ .Values.replicas }}
99
selector:
1010
matchLabels:
11-
{{- include "edgedb.selectorLabels" . | nindent 6 }}
11+
{{- include "gel.selectorLabels" . | nindent 6 }}
1212
template:
1313
metadata:
1414
{{- with .Values.podAnnotations }}
1515
annotations:
1616
{{- toYaml . | nindent 8 }}
1717
{{- end }}
1818
labels:
19-
{{- include "edgedb.labels" . | nindent 8 }}
19+
{{- include "gel.labels" . | nindent 8 }}
2020
{{- with .Values.podLabels }}
2121
{{- toYaml . | nindent 8 }}
2222
{{- end }}
@@ -32,7 +32,7 @@ spec:
3232
- name: wait-for-postgres
3333
image: postgres:16-alpine # Using postgres image for pg_isready tool
3434
env:
35-
- name: EDGEDB_SERVER_BACKEND_DSN
35+
- name: GEL_SERVER_BACKEND_DSN
3636
{{- if kindIs "string" .Values.postgres.dsn }}
3737
value: {{ .Values.postgres.dsn }}
3838
{{- else }}
@@ -41,7 +41,7 @@ spec:
4141
command: ['sh', '-c']
4242
args:
4343
- |
44-
until pg_isready -d "$EDGEDB_SERVER_BACKEND_DSN"; do
44+
until pg_isready -d "$GEL_SERVER_BACKEND_DSN"; do
4545
echo "Waiting for postgres..."
4646
sleep 2
4747
done
@@ -70,36 +70,36 @@ spec:
7070
{{- if not .Values.postgres.dsn }}
7171
{{- fail "You must provide a postgres dsn value if postgres is enabled" }}
7272
{{- end }}
73-
- name: EDGEDB_SERVER_BACKEND_DSN
73+
- name: GEL_SERVER_BACKEND_DSN
7474
{{- if kindIs "string" .Values.postgres.dsn }}
7575
value: {{ .Values.postgres.dsn }}
7676
{{- else }}
7777
{{ toYaml .Values.postgres.dsn | nindent 10 }}
7878
{{- end }}
7979
{{- end }}
8080
{{- if .Values.security.tls.enabled }}
81-
- name: EDGEDB_SERVER_TLS_CERT_FILE
82-
value: /etc/edgedb/tls/tls.crt
83-
- name: EDGEDB_SERVER_TLS_KEY_FILE
84-
value: /etc/edgedb/tls/tls.key
81+
- name: GEL_SERVER_TLS_CERT_FILE
82+
value: /etc/gel/tls/tls.crt
83+
- name: GEL_SERVER_TLS_KEY_FILE
84+
value: /etc/gel/tls/tls.key
8585
{{- else }}
86-
- name: EDGEDB_SERVER_TLS_CERT_MODE
86+
- name: GEL_SERVER_TLS_CERT_MODE
8787
value: generate_self_signed
8888
{{- end }}
89-
- name: EDGEDB_SERVER_PASSWORD
89+
- name: GEL_SERVER_PASSWORD
9090
valueFrom:
9191
secretKeyRef:
9292
{{- if .Values.security.password }}
9393
name: {{ .Values.security.password.secret }}
9494
key: {{ .Values.security.password.key }}
9595
{{- else }}
96-
name: {{ include "edgedb.fullname" . }}-server-password
96+
name: {{ include "gel.fullname" . }}-server-password
9797
key: password
9898
{{- end }}
9999
{{- with .Values.env }}
100100
{{- toYaml . | nindent 8 }}
101101
{{- end }}
102-
- name: EDGEDB_PORT
102+
- name: GEL_PORT
103103
value: "5656"
104104
volumeMounts:
105105
{{- if .Values.storage.enabled }}
@@ -110,11 +110,11 @@ spec:
110110
{{- fail "You cannot use storage with more than one replica, use postgres instead" }}
111111
{{- end }}
112112
- name: data
113-
mountPath: /var/lib/edgedb/data
113+
mountPath: /var/lib/gel/data
114114
{{- end }}
115115
{{- if .Values.security.tls.enabled }}
116116
- name: tls-cert
117-
mountPath: /etc/edgedb/tls
117+
mountPath: /etc/gel/tls
118118
readOnly: true
119119
{{- end }}
120120
{{- with .Values.volumeMounts }}
@@ -124,12 +124,12 @@ spec:
124124
{{- if .Values.storage.enabled }}
125125
- name: data
126126
persistentVolumeClaim:
127-
claimName: {{ include "edgedb.fullname" . }}-data
127+
claimName: {{ include "gel.fullname" . }}-data
128128
{{- end }}
129129
{{- if .Values.security.tls.enabled }}
130130
- name: tls-cert
131131
secret:
132-
secretName: {{ include "edgedb.tlsSecretName" . }}
132+
secretName: {{ include "gel.tlsSecretName" . }}
133133
{{- end }}
134134
{{- with .Values.volumes }}
135135
{{- toYaml . | nindent 8 }}

charts/gel/templates/password.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if not .Values.security.password }}
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: {{ include "gel.fullname" . }}-server-password
6+
labels:
7+
{{- include "gel.labels" . | nindent 4 }}
8+
type: Opaque
9+
data:
10+
password: {{ $password := include "gel.password" . }}{{ $password | b64enc | quote }}
11+
gelBackendDsn: {{ printf "gel://gel:%s@%s.%s.svc.cluster.local:5656" $password (include "gel.fullname" .) .Release.Namespace | b64enc | quote }}
12+
{{- end }}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
apiVersion: v1
66
kind: PersistentVolumeClaim
77
metadata:
8-
name: {{ include "edgedb.fullname" . }}-data
8+
name: {{ include "gel.fullname" . }}-data
99
labels:
10-
{{- include "edgedb.labels" . | nindent 4 }}
10+
{{- include "gel.labels" . | nindent 4 }}
1111
spec:
1212
accessModes:
1313
- ReadWriteOnce

0 commit comments

Comments
 (0)