From 978a88ced0bf5147f3193205a35c90ba0872d8eb Mon Sep 17 00:00:00 2001 From: nleconte-csgroup <86782407+nleconte-csgroup@users.noreply.github.com> Date: Fri, 10 Oct 2025 18:35:01 +0200 Subject: [PATCH 1/5] feat: add cnpgstac helm chart --- deploy/helm/cnpgstac/.helmignore | 40 +++ deploy/helm/cnpgstac/Chart.yaml | 29 ++ deploy/helm/cnpgstac/templates/_helpers.tpl | 110 +++++++ .../cnpgstac/templates/cnpgstac/Cluster.yaml | 136 ++++++++ .../cnpgstac/ClusterImageCatalog.yaml | 32 ++ .../cnpgstac/ClusterImageCatalogPostgis.yaml | 46 +++ .../cnpgstac/Configmap-extensions.yaml | 102 ++++++ .../templates/cnpgstac/Job-init-pgstac.yaml | 141 +++++++++ .../templates/cnpgstac/ObjectStore.yaml | 47 +++ .../templates/cnpgstac/Secret-obs.yaml | 33 ++ deploy/helm/cnpgstac/values.yaml | 295 ++++++++++++++++++ 11 files changed, 1011 insertions(+) create mode 100644 deploy/helm/cnpgstac/.helmignore create mode 100644 deploy/helm/cnpgstac/Chart.yaml create mode 100644 deploy/helm/cnpgstac/templates/_helpers.tpl create mode 100644 deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml create mode 100644 deploy/helm/cnpgstac/templates/cnpgstac/ClusterImageCatalog.yaml create mode 100644 deploy/helm/cnpgstac/templates/cnpgstac/ClusterImageCatalogPostgis.yaml create mode 100644 deploy/helm/cnpgstac/templates/cnpgstac/Configmap-extensions.yaml create mode 100644 deploy/helm/cnpgstac/templates/cnpgstac/Job-init-pgstac.yaml create mode 100644 deploy/helm/cnpgstac/templates/cnpgstac/ObjectStore.yaml create mode 100644 deploy/helm/cnpgstac/templates/cnpgstac/Secret-obs.yaml create mode 100644 deploy/helm/cnpgstac/values.yaml diff --git a/deploy/helm/cnpgstac/.helmignore b/deploy/helm/cnpgstac/.helmignore new file mode 100644 index 0000000..109f7e0 --- /dev/null +++ b/deploy/helm/cnpgstac/.helmignore @@ -0,0 +1,40 @@ +# Copyright 2025 CS Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ + +# dependencies +.tgz \ No newline at end of file diff --git a/deploy/helm/cnpgstac/Chart.yaml b/deploy/helm/cnpgstac/Chart.yaml new file mode 100644 index 0000000..27edb34 --- /dev/null +++ b/deploy/helm/cnpgstac/Chart.yaml @@ -0,0 +1,29 @@ +# Copyright 2025 CS Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v2 +dependencies: + - name: common + repository: oci://registry-1.docker.io/bitnamicharts + tags: + - bitnami-common + version: 2.x +description: A CS Group STAC backend based on CloudNativePG PostGIS and PgSTAC. +home: https://github.com/csgroup-oss/eo-catalogue +icon: https://github.com/csgroup-oss/eo-catalog/raw/refs/heads/main/docs/static/eo-catalogue-logo-1080.webp +name: eo-cnpgstac +sources: + - https://github.com/csgroup-oss/eo-catalogue +type: application +version: 0.10.0 diff --git a/deploy/helm/cnpgstac/templates/_helpers.tpl b/deploy/helm/cnpgstac/templates/_helpers.tpl new file mode 100644 index 0000000..228b859 --- /dev/null +++ b/deploy/helm/cnpgstac/templates/_helpers.tpl @@ -0,0 +1,110 @@ +{{/* +Copyright 2025 CS Group + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "cnpgstac.imagePullSecrets" -}} +{{- include "common.images.pullSecrets" (dict "images" (list .Values.cnpgstac.image) "global" .Values.global) -}} +{{- end -}} + +{{/* +Render imageCatalogRef block inside spec +*/}} +{{- define "cnpgstac.imageCatalogRef" -}} +apiGroup: postgresql.cnpg.io +kind: ClusterImageCatalog +name: {{ default "cnpgstac" .Values.cnpgstac.imageCatalog.name }} +major: {{ default 17 .Values.cnpgstac.imageCatalog.major }} +{{- end -}} + +{{/* +Render only the images list for ClusterImageCatalog, with inline image values +*/}} +{{- define "cnpgstac.clusterImageCatalogList" -}} +{{- range .Values.cnpgstac.imageCatalog.images }} + - major: {{ .major }} + image: "{{- $registry := trimSuffix "/" (default "ghcr.io" .registry) -}} + {{- $repository := trimPrefix "/" (default "csgroup-oss/eo-catalog-cnpgstac" .repository) -}} + {{- $tag := default "latest" .tag -}} + {{- $digest := .digest -}} + {{- if $digest -}} + {{- printf "%s/%s@%s" $registry $repository $digest -}} + {{- else -}} + {{- printf "%s/%s:%v" $registry $repository $tag -}} + {{- end }}" +{{- end }} +{{- end }} + +{{/* +Calculate the memory settings +*/}} + +{{/* +Convert suffix to PostgreSQL valid memory units : +https://www.postgresql.org/docs/current/config-setting.html#CONFIG-SETTING-NAMES-VALUES +*/}} +{{- define "limit_suffix_bytes" -}} +{{- $limit_suffix := .Values.cnpgstac.resources.limits.memory | toString | regexFind "[^0-9.]+" -}} + {{- if eq "G" $limit_suffix -}} + GB + {{- else if eq "Gi" $limit_suffix -}} + GB + {{- else if eq "M" $limit_suffix -}} + MB + {{- else if eq "Mi" $limit_suffix -}} + MB + {{- else if eq "k" $limit_suffix -}} + KB + {{- else if eq "Ki" $limit_suffix -}} + KB + {{- else if eq "T" $limit_suffix -}} + TB + {{- else if eq "Ti" $limit_suffix -}} + TB + {{- else if eq "P" $limit_suffix -}} + PB + {{- else if eq "Pi" $limit_suffix -}} + PB + {{- else if eq "E" $limit_suffix -}} + EB + {{- else if eq "Ei" $limit_suffix -}} + EB + {{- else if eq "" $limit_suffix -}} + {{- /* Check for empty suffix, meaning bytes */ -}} + B + {{- else -}} + {{- /* Unknown suffix case, assume GB */ -}} + GB {{- printf " # Warning: Unknown suffix '%s' Defaulting to GB." . -}} + {{- end -}} +{{- end -}} + +{{/* +Calculate shared_buffers: should be 1/4 of the total RAM +*/}} +{{- define "shared_buffers" -}} +{{- $limit_value := .Values.cnpgstac.resources.limits.memory | toString | regexFind "[0-9.]+" -}} +{{ mulf $limit_value 0.25 }} +{{- end -}} + +{{/* +Calculate effective_cache_size: should be 3/4 of the total RAM +*/}} +{{- define "effective_cache_size" -}} +{{- $limit_value := .Values.cnpgstac.resources.limits.memory | toString | regexFind "[0-9.]+" -}} +{{ mulf $limit_value 0.75 }} +{{- end -}} + diff --git a/deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml b/deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml new file mode 100644 index 0000000..d62d94e --- /dev/null +++ b/deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml @@ -0,0 +1,136 @@ +# Copyright 2025 CS Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: {{ .Values.cnpgstac.clusterName }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" . | nindent 4 }} + app.kubernetes.io/component: cnpgstac + {{- if .Values.commonLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} + {{- end }} +spec: + {{- if .Values.cnpgstac.imageCatalog.enabled }} + imageCatalogRef: + apiGroup: postgresql.cnpg.io + kind: ClusterImageCatalog + name: {{ .Values.cnpgstac.imageCatalog.name }} + major: {{ .Values.cnpgstac.imageCatalog.major }} + {{- else if or (and .Values.cnpgstac.image.repository .Values.cnpgstac.image.registry) .Values.global.imageRegistry }} + {{- $image := include "common.images.image" (dict "imageRoot" .Values.cnpgstac.image "global" .Values.global) | trim }} + imageName: {{ $image }} + {{- else }} + imageCatalogRef: + apiGroup: postgresql.cnpg.io + kind: ClusterImageCatalog + name: postgis-standard-trixie + major: 17 + {{- end }} + {{- if .Values.cnpgstac.imagePullPolicy }} + imagePullPolicy: {{ .Values.cnpgstac.image.pullPolicy }} + {{- end }} + {{- include "cnpgstac.imagePullSecrets" . | nindent 2 }} + instances: {{ .Values.cnpgstac.instances | default "3" }} + {{- if .Values.cnpgstac.startDelay }} + startDelay: {{ .Values.cnpgstac.startDelay }} + {{- end }} + {{- if .Values.cnpgstac.stopDelay }} + stopDelay: {{ .Values.cnpgstac.stopDelay }} + {{- end }} + {{- if .Values.cnpgstac.primaryUpdateStrategy }} + primaryUpdateStrategy: {{ .Values.cnpgstac.primaryUpdateStrategy }} + {{- end }} + {{- with .Values.cnpgstac.bootstrap }} + bootstrap: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.cnpgstac.superUserAccess.enabled }} + enableSuperuserAccess: true + {{- end }} + {{- if .Values.cnpgstac.backup.barman.enabled }} + plugins: + - name: barman-cloud.cloudnative-pg.io + isWALArchiver: {{ .Values.cnpgstac.backup.barman.barman.isWALArchiver }} + parameters: + barmanObjectName: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.name }} + {{- end }} + {{- if .Values.cnpgstac.superUserAccess.existingSecret }} + superuserSecret: + name: {{- .Values.cnpgstac.superUserAccess.existingSecret }} + {{- end }} + postgresql: + parameters: + {{- with .Values.cnpgstac.postgresql.parameters }} + {{- toYaml . | nindent 6 }} + {{- end }} + # shared_buffers: should be 1/4 of the total RAM + shared_buffers: {{ include "shared_buffers" . }}{{ include "limit_suffix_bytes" . }} + # effective_cache_size: should be 3/4 of the total RAM + effective_cache_size: {{ include "effective_cache_size" . }}{{ include "limit_suffix_bytes" . }} + {{- with .Values.cnpgstac.postgresql.shared_preload_libraries }} + shared_preload_libraries: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.cnpgstac.postgresql.pg_hba }} + pg_hba: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.cnpgstac.postgresql.pg_ident }} + pg_ident: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.cnpgstac.postgresql.synchronous }} + synchronous: + {{- toYaml . | nindent 6 }} + {{ end }} + {{- if .Values.cnpgstac.resources }} + resources: {{- toYaml .Values.cnpgstac.resources | nindent 4 }} + {{- end }} + {{- if .Values.cnpgstac.persistence.enabled }} + storage: + pvcTemplate: + accessModes: + {{- range .Values.cnpgstac.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.cnpgstac.persistence.size | quote }} + volumeMode: Filesystem + {{- include "common.storage.class" (dict "persistence" .Values.cnpgstac.persistence "global" .Values.global) | nindent 6 }} + {{- end }} + {{- if .Values.cnpgstac.affinity }} + affinity: {{- include "common.tplvalues.render" (dict "value" .Values.cnpgstac.affinity "context" $) | nindent 4 }} + {{- else if or .Values.cnpgstac.podAffinityPreset .Values.cnpgstac.podAntiAffinityPreset .Values.cnpgstac.nodeAffinityPreset }} + affinity: + # https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-AffinityConfiguration + enablePodAntiAffinity: false + topologyKey: '' + podAntiAffinityType: '' + # tolerations: '' + additionalPodAffinity: {{- include "common.affinities.pods" (dict "type" .Values.cnpgstac.podAffinityPreset "instance" .Chart.Name "context" $) | nindent 6}} + additionalPodAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.cnpgstac.podAntiAffinityPreset "instance" .Chart.Name "context" $) | nindent 8 }} + nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.cnpgstac.nodeAffinityPreset.type "key" .Values.cnpgstac.nodeAffinityPreset.key "values" .Values.cnpgstac.nodeAffinityPreset.values) | nindent 6 }} + {{- end }} + {{- if .Values.cnpgstac.nodeSelector }} + nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.cnpgstac.nodeSelector "context" $) | nindent 6 }} + {{- end }} + {{- if .Values.cnpgstac.tolerations }} + tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.cnpgstac.tolerations "context" .) | nindent 6 }} + {{- end }} diff --git a/deploy/helm/cnpgstac/templates/cnpgstac/ClusterImageCatalog.yaml b/deploy/helm/cnpgstac/templates/cnpgstac/ClusterImageCatalog.yaml new file mode 100644 index 0000000..b167764 --- /dev/null +++ b/deploy/helm/cnpgstac/templates/cnpgstac/ClusterImageCatalog.yaml @@ -0,0 +1,32 @@ +# Copyright 2025 CS Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +{{- if .Values.cnpgstac.imageCatalog.enabled }} +apiVersion: postgresql.cnpg.io/v1 +kind: ClusterImageCatalog +metadata: + name: {{ .Values.cnpgstac.imageCatalog.name }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" . | nindent 4 }} + app.kubernetes.io/component: cnpgstac + {{- if .Values.commonLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} + {{- end }} +spec: + images: +{{- include "cnpgstac.clusterImageCatalogList" . | indent 4 }} +{{- end }} \ No newline at end of file diff --git a/deploy/helm/cnpgstac/templates/cnpgstac/ClusterImageCatalogPostgis.yaml b/deploy/helm/cnpgstac/templates/cnpgstac/ClusterImageCatalogPostgis.yaml new file mode 100644 index 0000000..12c14aa --- /dev/null +++ b/deploy/helm/cnpgstac/templates/cnpgstac/ClusterImageCatalogPostgis.yaml @@ -0,0 +1,46 @@ +# Copyright 2025 CS Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: postgresql.cnpg.io/v1 +kind: ClusterImageCatalog +metadata: + name: postgis-standard-trixie + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" . | nindent 4 }} + app.kubernetes.io/component: cnpgstac + images.cnpg.io/family: postgis + images.cnpg.io/type: standard + images.cnpg.io/os: trixie + images.cnpg.io/date: '20251006' + images.cnpg.io/publisher: cnpg.io + {{- if .Values.commonLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} + {{- end }} +spec: + images: + - major: 13 + image: ghcr.io/cloudnative-pg/postgis:13-3-standard-trixie + - major: 14 + image: ghcr.io/cloudnative-pg/postgis:14-3-standard-trixie + - major: 15 + image: ghcr.io/cloudnative-pg/postgis:15-3-standard-trixie + - major: 16 + image: ghcr.io/cloudnative-pg/postgis:16-3-standard-trixie + - major: 17 + image: ghcr.io/cloudnative-pg/postgis:17-3-standard-trixie + - major: 18 + image: ghcr.io/cloudnative-pg/postgis:18-3-standard-trixie \ No newline at end of file diff --git a/deploy/helm/cnpgstac/templates/cnpgstac/Configmap-extensions.yaml b/deploy/helm/cnpgstac/templates/cnpgstac/Configmap-extensions.yaml new file mode 100644 index 0000000..628e93a --- /dev/null +++ b/deploy/helm/cnpgstac/templates/cnpgstac/Configmap-extensions.yaml @@ -0,0 +1,102 @@ +# Copyright 2025 CS Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +{{- if .Values.cnpgstac.custom.enabled }} +{{- if or .Values.cnpgstac.custom.extensions .Values.cnpgstac.custom.queryables }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-patch-post-action + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" . | nindent 4 }} + app.kubernetes.io/component: cnpgstac + {{- if .Values.commonLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} + {{- end }} +data: + pgstac_extensions_queryables.sh: |- + psql -X -q -v ON_ERROR_STOP=1 {{ .Values.cnpgstac.bootstrap.initdb.database }} < Date: Wed, 15 Oct 2025 12:43:49 +0200 Subject: [PATCH 2/5] fix: isWALArchiver path and objectstore compression --- deploy/helm/cnpgstac/Chart.yaml | 3 +- .../cnpgstac/templates/cnpgstac/Cluster.yaml | 2 +- .../templates/cnpgstac/ObjectStore.yaml | 10 ++- deploy/helm/cnpgstac/values.yaml | 69 ++++++++++--------- 4 files changed, 48 insertions(+), 36 deletions(-) diff --git a/deploy/helm/cnpgstac/Chart.yaml b/deploy/helm/cnpgstac/Chart.yaml index 27edb34..726510b 100644 --- a/deploy/helm/cnpgstac/Chart.yaml +++ b/deploy/helm/cnpgstac/Chart.yaml @@ -26,4 +26,5 @@ name: eo-cnpgstac sources: - https://github.com/csgroup-oss/eo-catalogue type: application -version: 0.10.0 +version: 1.0.0-alpha +appVersion: 0.9.8 diff --git a/deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml b/deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml index d62d94e..8922abc 100644 --- a/deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml +++ b/deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml @@ -66,7 +66,7 @@ spec: {{- if .Values.cnpgstac.backup.barman.enabled }} plugins: - name: barman-cloud.cloudnative-pg.io - isWALArchiver: {{ .Values.cnpgstac.backup.barman.barman.isWALArchiver }} + isWALArchiver: {{ .Values.cnpgstac.backup.barman.isWALArchiver }} parameters: barmanObjectName: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.name }} {{- end }} diff --git a/deploy/helm/cnpgstac/templates/cnpgstac/ObjectStore.yaml b/deploy/helm/cnpgstac/templates/cnpgstac/ObjectStore.yaml index ce83efc..3967e30 100644 --- a/deploy/helm/cnpgstac/templates/cnpgstac/ObjectStore.yaml +++ b/deploy/helm/cnpgstac/templates/cnpgstac/ObjectStore.yaml @@ -38,10 +38,16 @@ spec: secretAccessKey: key: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.configuration.s3Credentials.secretAccessKey }} name: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.configuration.s3Credentials.secretName }} + {{- with .Values.cnpgstac.backup.barman.barmanObjectStore.configuration }} + {{- if ne .wal.compression "none" }} wal: - compression: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.configuration.wal.compression }} + compression: {{ .wal.compression }} + {{- end }} + {{- if ne .data.compression "none" }} data: - compression: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.configuration.data.compression }} + compression: {{ .data.compression }} + {{- end }} + {{- end }} retentionPolicy: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.retentionPolicy }} {{- end }} {{- end }} \ No newline at end of file diff --git a/deploy/helm/cnpgstac/values.yaml b/deploy/helm/cnpgstac/values.yaml index e8c0471..ae10aab 100644 --- a/deploy/helm/cnpgstac/values.yaml +++ b/deploy/helm/cnpgstac/values.yaml @@ -144,34 +144,34 @@ cnpgstac: enabled: false # -- Additionnals STAC extensions - extensions: - - https://stac-extensions.github.io/eo/v1.1.0/schema.json - - https://stac-extensions.github.io/sat/v1.0.0/schema.json - - https://stac-extensions.github.io/projection/v1.1.0/schema.json - - https://stac-extensions.github.io/processing/v1.2.0/schema.json - - https://stac-extensions.github.io/product/v0.1.0/schema.json - - https://stac-extensions.github.io/sar/v1.0.0/schema.json - - https://stac-extensions.github.io/raster/v1.1.0/schema.json - - https://stac-extensions.github.io/authentication/v1.1.0/schema.json - - https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json - - https://stac-extensions.github.io/timestamps/v1.1.0/schema.json + extensions: [] + # - https://stac-extensions.github.io/eo/v1.1.0/schema.json + # - https://stac-extensions.github.io/sat/v1.0.0/schema.json + # - https://stac-extensions.github.io/projection/v1.1.0/schema.json + # - https://stac-extensions.github.io/processing/v1.2.0/schema.json + # - https://stac-extensions.github.io/product/v0.1.0/schema.json + # - https://stac-extensions.github.io/sar/v1.0.0/schema.json + # - https://stac-extensions.github.io/raster/v1.1.0/schema.json + # - https://stac-extensions.github.io/authentication/v1.1.0/schema.json + # - https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json + # - https://stac-extensions.github.io/timestamps/v1.1.0/schema.json # -- Additionnals queryables - queryables: - - eo:snow_cover - - sat:absolute_orbit - - sat:relative_orbit - - processing:level - - processing:facility - - processing:datetime - - processing:version - - product:type - - product:timeliness - - product:timeliness_category - - sar:instrument_mode - - published - - expires - - unpublished + queryables: [] + # - eo:snow_cover + # - sat:absolute_orbit + # - sat:relative_orbit + # - processing:level + # - processing:facility + # - processing:datetime + # - processing:version + # - product:type + # - product:timeliness + # - product:timeliness_category + # - sar:instrument_mode + # - published + # - expires + # - unpublished #### use template to render only if needed # -- Pod initContainers @@ -213,12 +213,17 @@ cnpgstac: enabled: false name: cnpgstac major: 17 - images: - - major: 17 - registry: ghcr.io - repository: csgroup-oss/eo-catalog-cnpgstac - tag: feat-cloudnativepg - digest: '' + images: [] + # - major: 17 + # registry: 643vlk6z.gra7.container-registry.ovh.net + # repository: public/eo-catalog-cnpgis + # tag: 17 + # digest: '' + # - major: 16 + # registry: 643vlk6z.gra7.container-registry.ovh.net + # repository: public/eo-catalog-cnpgis + # tag: '' + # digest: 'sha256:61546939083837014b75c0217abef966b7e484b8b9b4104c7d0a285572bbf08d' ## CloudNative PostGIS resource requests and limits ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ From ce534216dbc1bde48a9391f08bea7b06aebc55ff Mon Sep 17 00:00:00 2001 From: nleconte-csgroup Date: Tue, 28 Oct 2025 09:51:25 +0100 Subject: [PATCH 3/5] feat: add cnpgstac.clusterLabels --- deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml b/deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml index 8922abc..c243233 100644 --- a/deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml +++ b/deploy/helm/cnpgstac/templates/cnpgstac/Cluster.yaml @@ -22,6 +22,9 @@ metadata: {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} {{- end }} + {{- if .Values.cnpgstac.clusterLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.cnpgstac.clusterLabels "context" $) | nindent 4 }} + {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} {{- end }} From 8f50fb3967e1ccbd26529f7b86e5f10f4ba2329b Mon Sep 17 00:00:00 2001 From: nleconte-csgroup Date: Tue, 28 Oct 2025 09:53:11 +0100 Subject: [PATCH 4/5] feat: add cnpgstac.clusterLabels --- deploy/helm/cnpgstac/values.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deploy/helm/cnpgstac/values.yaml b/deploy/helm/cnpgstac/values.yaml index ae10aab..b03e4db 100644 --- a/deploy/helm/cnpgstac/values.yaml +++ b/deploy/helm/cnpgstac/values.yaml @@ -67,6 +67,10 @@ cnpgstac: ## @param cnpgstac.clusterName Name of the cnpgstac cluster clusterName: cnpgstac + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + ## ref: https://cloudnative-pg.io/documentation/current/labels_annotations/#labels-and-annotations + clusterLabels: {} + ## Define postgres user password ## ref: https://cloudnative-pg.io/documentation/current/security/#postgresql superUserAccess: From d6b63962cad86dce309b87464b6dd2a19e3663e3 Mon Sep 17 00:00:00 2001 From: nleconte-csgroup <86782407+nleconte-csgroup@users.noreply.github.com> Date: Wed, 5 Nov 2025 16:06:03 +0100 Subject: [PATCH 5/5] fix: Update S3 credentials in ObjectStore.yaml Replaced real values with the key from the secret's content. --- deploy/helm/cnpgstac/templates/cnpgstac/ObjectStore.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/helm/cnpgstac/templates/cnpgstac/ObjectStore.yaml b/deploy/helm/cnpgstac/templates/cnpgstac/ObjectStore.yaml index 3967e30..ed8807c 100644 --- a/deploy/helm/cnpgstac/templates/cnpgstac/ObjectStore.yaml +++ b/deploy/helm/cnpgstac/templates/cnpgstac/ObjectStore.yaml @@ -33,10 +33,10 @@ spec: endpointURL: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.configuration.endpointURL }} s3Credentials: accessKeyId: - key: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.configuration.s3Credentials.accessKeyId}} + key: S3_ACCESSKEY name: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.configuration.s3Credentials.secretName }} secretAccessKey: - key: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.configuration.s3Credentials.secretAccessKey }} + key: S3_SECRETKEY name: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.configuration.s3Credentials.secretName }} {{- with .Values.cnpgstac.backup.barman.barmanObjectStore.configuration }} {{- if ne .wal.compression "none" }} @@ -50,4 +50,4 @@ spec: {{- end }} retentionPolicy: {{ .Values.cnpgstac.backup.barman.barmanObjectStore.retentionPolicy }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }}