Support external PostgreSQL deployments
This commit is contained in:
1 parent
592de4dcc9
commit
af6196d4a9
5 files changed
+22
-3
No files matched your search
@@ -40,7 +40,8 @@ The example enables Ingress and uses example hostnames. Set your own values for
|
||||
bucket must already exist unless `bucketBootstrap.enabled` is explicitly
|
||||
enabled. PostgreSQL uses a persistent volume claim; set
|
||||
`postgresql.persistence.storageClass` and its size as appropriate for your
|
||||
cluster.
|
||||
cluster. Set `postgresql.enabled: false` when supplying an external PostgreSQL
|
||||
service; configure the application Secret's `database-url` for that service.
|
||||
|
||||
## Chart releases
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
@@ -123,4 +124,5 @@ spec:
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.postgresql.persistence.size }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -10,7 +10,12 @@
|
||||
"config": {"type": "object"},
|
||||
"service": {"type": "object"},
|
||||
"ingress": {"type": "object"},
|
||||
"postgresql": {"type": "object"},
|
||||
"postgresql": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
"resources": {"type": "object"},
|
||||
"cache": {"type": "object"},
|
||||
"tmp": {"type": "object"},
|
||||
|
||||
@@ -52,6 +52,7 @@ ingress:
|
||||
host: ""
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
name: postgresql
|
||||
image:
|
||||
repository: postgres
|
||||
|
||||
@@ -13,8 +13,18 @@ grep -Fq 'name: asciinema-secrets' /tmp/asciinema-rendered.yaml
|
||||
grep -Fq 'kind: StatefulSet' /tmp/asciinema-rendered.yaml
|
||||
grep -Fq 'kind: Ingress' /tmp/asciinema-rendered.yaml
|
||||
|
||||
helm template asciinema "$chart" --namespace asciinema \
|
||||
--values "$project_dir/examples/values.yaml" --set postgresql.enabled=false \
|
||||
> /tmp/asciinema-external-postgresql-rendered.yaml
|
||||
if grep -Eq '^kind: (StatefulSet|PersistentVolumeClaim)$' /tmp/asciinema-external-postgresql-rendered.yaml; then
|
||||
echo 'PostgreSQL resources must be omitted when postgresql.enabled=false.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if command -v kubeconform >/dev/null 2>&1; then
|
||||
kubeconform -strict -summary /tmp/asciinema-rendered.yaml
|
||||
elif command -v docker >/dev/null 2>&1; then
|
||||
elif command -v docker >/dev/null 2>&1 && docker info >/dev/null 2>&1; then
|
||||
docker run --rm --interactive ghcr.io/yannh/kubeconform:v0.7.0 -strict -summary < /tmp/asciinema-rendered.yaml
|
||||
else
|
||||
echo 'Skipping kubeconform; neither kubeconform nor a running Docker daemon is available.'
|
||||
fi
|
||||
Reference in new issue
Block a user