From cb47c2500e98f4c2b6aece0904daa2ce1942baa3 Mon Sep 17 00:00:00 2001 From: Emilien Devos Date: Thu, 16 Nov 2023 15:35:05 +0100 Subject: [PATCH] keep pvc resources by default (#65) * keep pvc resources by default * persist PVC of postgresql too --- templates/geonetwork/elasticsearch/es-data-pvc.yaml | 1 + templates/geonetwork/geonetwork-datadir-pvc.yaml | 1 + templates/geoserver/geoserver-datadir-pvc.yaml | 1 + templates/geoserver/geoserver-geodata-pvc.yaml | 1 + templates/geoserver/geoserver-tiles-pvc.yaml | 1 + templates/ldap/openldap-pvc.yaml | 2 ++ templates/mapstore/mapstore-pvc.yaml | 1 + values.yaml | 2 ++ 8 files changed, 10 insertions(+) diff --git a/templates/geonetwork/elasticsearch/es-data-pvc.yaml b/templates/geonetwork/elasticsearch/es-data-pvc.yaml index 8abee7b..f90aaf2 100644 --- a/templates/geonetwork/elasticsearch/es-data-pvc.yaml +++ b/templates/geonetwork/elasticsearch/es-data-pvc.yaml @@ -6,6 +6,7 @@ metadata: labels: {{- include "georchestra.labels" . | nindent 4 }} app.kubernetes.io/component: {{ include "georchestra.fullname" . }}-gn4-elasticsearch + helm.sh/resource-policy: "keep" spec: accessModes: - ReadWriteOnce diff --git a/templates/geonetwork/geonetwork-datadir-pvc.yaml b/templates/geonetwork/geonetwork-datadir-pvc.yaml index b69c33c..1d13280 100644 --- a/templates/geonetwork/geonetwork-datadir-pvc.yaml +++ b/templates/geonetwork/geonetwork-datadir-pvc.yaml @@ -6,6 +6,7 @@ metadata: labels: {{- include "georchestra.labels" . | nindent 4 }} app.kubernetes.io/component: {{ include "georchestra.fullname" . }}-geonetwork + helm.sh/resource-policy: "keep" spec: accessModes: - ReadWriteOnce diff --git a/templates/geoserver/geoserver-datadir-pvc.yaml b/templates/geoserver/geoserver-datadir-pvc.yaml index 86b004b..5dbc84e 100644 --- a/templates/geoserver/geoserver-datadir-pvc.yaml +++ b/templates/geoserver/geoserver-datadir-pvc.yaml @@ -6,6 +6,7 @@ metadata: labels: {{- include "georchestra.labels" . | nindent 4 }} app.kubernetes.io/component: {{ include "georchestra.fullname" . }}-geoserver + helm.sh/resource-policy: "keep" spec: accessModes: - ReadWriteOnce diff --git a/templates/geoserver/geoserver-geodata-pvc.yaml b/templates/geoserver/geoserver-geodata-pvc.yaml index 4f8bfb6..b309c6e 100644 --- a/templates/geoserver/geoserver-geodata-pvc.yaml +++ b/templates/geoserver/geoserver-geodata-pvc.yaml @@ -6,6 +6,7 @@ metadata: labels: {{- include "georchestra.labels" . | nindent 4 }} app.kubernetes.io/component: {{ include "georchestra.fullname" . }}-geoserver + helm.sh/resource-policy: "keep" spec: accessModes: - ReadWriteOnce diff --git a/templates/geoserver/geoserver-tiles-pvc.yaml b/templates/geoserver/geoserver-tiles-pvc.yaml index ed4a270..82f35dc 100644 --- a/templates/geoserver/geoserver-tiles-pvc.yaml +++ b/templates/geoserver/geoserver-tiles-pvc.yaml @@ -6,6 +6,7 @@ metadata: labels: {{- include "georchestra.labels" . | nindent 4 }} app.kubernetes.io/component: {{ include "georchestra.fullname" . }}-geoserver + helm.sh/resource-policy: "keep" spec: accessModes: - ReadWriteOnce diff --git a/templates/ldap/openldap-pvc.yaml b/templates/ldap/openldap-pvc.yaml index d8afd0b..c7471dd 100644 --- a/templates/ldap/openldap-pvc.yaml +++ b/templates/ldap/openldap-pvc.yaml @@ -6,6 +6,7 @@ metadata: labels: {{- include "georchestra.labels" . | nindent 4 }} app.kubernetes.io/component: {{ include "georchestra.fullname" . }}-ldap + helm.sh/resource-policy: "keep" spec: accessModes: - ReadWriteOnce @@ -26,6 +27,7 @@ metadata: labels: {{- include "georchestra.labels" . | nindent 4 }} app.kubernetes.io/component: {{ include "georchestra.fullname" . }}-ldap + helm.sh/resource-policy: "keep" spec: accessModes: - ReadWriteOnce diff --git a/templates/mapstore/mapstore-pvc.yaml b/templates/mapstore/mapstore-pvc.yaml index 651dc94..c43ac03 100644 --- a/templates/mapstore/mapstore-pvc.yaml +++ b/templates/mapstore/mapstore-pvc.yaml @@ -6,6 +6,7 @@ metadata: labels: {{- include "georchestra.labels" . | nindent 4 }} app.kubernetes.io/component: {{ include "georchestra.fullname" . }}-mapstore + helm.sh/resource-policy: "keep" spec: accessModes: - ReadWriteOnce diff --git a/values.yaml b/values.yaml index 1232ed0..761e78a 100644 --- a/values.yaml +++ b/values.yaml @@ -246,6 +246,8 @@ database: ssl: false username: georchestra primary: # section of parameters for builtin database + persistentVolumeClaimRetentionPolicy: + enabled: true extraVolumeMounts: - name: "00-initsql" mountPath: "/docker-entrypoint-initdb.d/00_init.sql"