fix: fix volumes and secrets for atlantis

This commit is contained in:
2024-10-04 14:28:09 +02:00
parent 1eb0e6c630
commit 2e00aceed1
4 changed files with 76 additions and 15 deletions
+11 -10
View File
@@ -8,7 +8,8 @@ metadata:
labels:
{{- include "Atlantis.labels" . | nindent 4 }}
spec:
instances: {{ .Values.cluster.instances | default "2" }}
instances: {{ .Values.cluster.instances | default "1" }}
imageName: ghcr.io/cloudnative-pg/postgis:15-3.3
# Example of rolling update strategy:
# - unsupervised: automated update of the primary once all
# replicas have been upgraded (default)
@@ -19,16 +20,8 @@ spec:
retentionPolicy: {{ .Values.cluster.backupRetention | default "60d" }}
storage:
size: {{ .Values.cluster.size | default "5Gi" }}
imageName: ghcr.io/cloudnative-pg/postgis:15-3.3
bootstrap:
initdb:
postInitTemplateSQL:
- CREATE EXTENSION postgis;
- CREATE EXTENSION postgis_topology;
- CREATE EXTENSION fuzzystrmatch;
- CREATE EXTENSION postgis_tiger_geocoder;
- ALTER USER app WITH SUPERUSER;
{{- with .Values.cluster.bootstrap }}
bootstrap:
{{- if .enabled }}
pg_basebackup:
source: archmaester
@@ -47,6 +40,14 @@ spec:
sslRootCert:
name: {{ .source.db }}-ca
key: ca.crt
{{- else }}
initdb:
postInitTemplateSQL:
- CREATE EXTENSION postgis;
- CREATE EXTENSION postgis_topology;
- CREATE EXTENSION fuzzystrmatch;
- CREATE EXTENSION postgis_tiger_geocoder;
- ALTER USER app WITH SUPERUSER;
{{- end }}
{{- end }}
{{- end }}
+22
View File
@@ -29,4 +29,26 @@ type: kubernetes.io/basic-auth
data:
username:
password:
{{- else }}
apiVersion: v1
kind: Secret
metadata:
annotations:
kyverno/clone: "true"
name: {{ .Values.cluster.bootstrap.source.db }}-replication
type: kubernetes.io/tls
data:
tls.crt: ""
tls.key: ""
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
annotations:
kyverno/clone: "true"
name: {{ .Values.cluster.bootstrap.source.db }}-ca
data:
ca.crt: ""
ca.key: ""
{{- end }}