From 042e2fda9b8e41c7679158c6b6c52630fb7e5bc7 Mon Sep 17 00:00:00 2001 From: jessebot Date: Sun, 18 Jan 2026 11:27:42 +0100 Subject: [PATCH 1/2] reorganize test app --- README.md | 25 +++---------------- charts/cloudnative-pg-cluster/Chart.yaml | 2 +- charts/cloudnative-pg-cluster/README.md | 4 ++- .../templates/test-app.yaml | 6 ++--- charts/cloudnative-pg-cluster/values.yaml | 6 +++++ 5 files changed, 17 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 10e0fad..d89a18f 100644 --- a/README.md +++ b/README.md @@ -104,26 +104,9 @@ name: "app-postgres" testApp: enabled: true - -cnpgCluster: - # -- enable this to deploy the official CNPG cluster helm chart dep - # All other values here are passed directly to the their chart. See: - # https://github.com/cloudnative-pg/charts/blob/main/charts/cluster/values.yaml - enabled: true - # -- see: https://cloudnative-pg.io/docs/1.28/certificates#client-certificate - certificates: - ## examples if using our certificates features of this chart. - ## NOTE: app-postgres should be replaced with whatever you set Values.name to - serverTLSSecret: "app-postgres-server-cert" - serverCASecret: "app-postgres-server-ca-key-pair" - clientCASecret: "app-postgres-client-ca-key-pair" - replicationTLSSecret: "app-postgres-client-cert" - - cluster: - initdb: - # -- replace this with your database name - database: app - # -- replace this with your database username - owner: app + # -- replace this with your database name + database: app + # -- replace this with your database username + owner: app ``` This will create a very basic Deployment of `ghcr.io/cloudnative-pg/webtest` [as described in the official docs](https://cloudnative-pg.io/docs/1.28/ssl_connections#testing-the-connection-via-a-tls-certificate) that attempts to connect to your postgres cluster using full mTLS. diff --git a/charts/cloudnative-pg-cluster/Chart.yaml b/charts/cloudnative-pg-cluster/Chart.yaml index 9d282c4..ad8df0a 100644 --- a/charts/cloudnative-pg-cluster/Chart.yaml +++ b/charts/cloudnative-pg-cluster/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: cnpg-cluster description: Create postgres tenant clusters managed by the CNPG Operator type: application -version: 1.0.2 +version: 1.1.0 dependencies: - name: cluster diff --git a/charts/cloudnative-pg-cluster/README.md b/charts/cloudnative-pg-cluster/README.md index 9a03639..68ec340 100644 --- a/charts/cloudnative-pg-cluster/README.md +++ b/charts/cloudnative-pg-cluster/README.md @@ -1,6 +1,6 @@ # cnpg-cluster -![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Create postgres tenant clusters managed by the CNPG Operator @@ -46,7 +46,9 @@ Create postgres tenant clusters managed by the CNPG Operator | cnpgCluster.type | string | `"postgresql"` | | | cnpgCluster.version.postgresql | string | `"16"` | | | name | string | `"app-postgres"` | name to use for templating certs | +| testApp.database | string | `"app"` | this is required for testing the application. please change to your database name in your postgresql clsuter | | testApp.enabled | bool | `false` | | +| testApp.owner | string | `"app"` | this is required for testing the application. please change to your database's username in your postgresql clsuter | ---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) diff --git a/charts/cloudnative-pg-cluster/templates/test-app.yaml b/charts/cloudnative-pg-cluster/templates/test-app.yaml index 414a22e..9c9e4ae 100644 --- a/charts/cloudnative-pg-cluster/templates/test-app.yaml +++ b/charts/cloudnative-pg-cluster/templates/test-app.yaml @@ -30,8 +30,8 @@ spec: sslcert=/etc/secrets/app/tls.crt sslrootcert=/etc/secrets/ca/ca.crt host={{ .Values.name }}-rw.{{ .Release.Namespace }}.svc - dbname={{ .Values.cnpgCluster.cluster.initdb.database }} - user={{ .Values.cnpgCluster.cluster.initdb.owner }} + dbname={{ .Values.testApp.database }} + user={{ .Values.testApp.owner }} sslmode=verify-full - name: SQL_QUERY value: SELECT 1 @@ -50,6 +50,6 @@ spec: defaultMode: 0600 - name: secret-volume-app secret: - secretName: "{{ .Values.name }}-{{ .Values.cnpgCluster.cluster.initdb.owner }}-cert" + secretName: "{{ .Values.name }}-{{ .Values.testApp.owner }}-cert" defaultMode: 0600 {{- end }} diff --git a/charts/cloudnative-pg-cluster/values.yaml b/charts/cloudnative-pg-cluster/values.yaml index 3f62833..850e78d 100644 --- a/charts/cloudnative-pg-cluster/values.yaml +++ b/charts/cloudnative-pg-cluster/values.yaml @@ -40,6 +40,12 @@ testApp: # Populates user and DB from the Initdb owner and database values # Requires server, client, and user certificate generation to be enabled. enabled: false + # -- this is required for testing the application. + # please change to your database's username in your postgresql clsuter + owner: app + # -- this is required for testing the application. + # please change to your database name in your postgresql clsuter + database: app cnpgCluster: # -- enable this to deploy the official CNPG cluster helm chart dep From 515c059264e08bfb1e704d9e9d8a8df254beba5b Mon Sep 17 00:00:00 2001 From: jessebot Date: Sun, 18 Jan 2026 11:32:24 +0100 Subject: [PATCH 2/2] try to clean up the ci test --- .github/workflows/ci-helm-lint-test.yml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/.github/workflows/ci-helm-lint-test.yml b/.github/workflows/ci-helm-lint-test.yml index 9416193..cc2b716 100644 --- a/.github/workflows/ci-helm-lint-test.yml +++ b/.github/workflows/ci-helm-lint-test.yml @@ -79,13 +79,6 @@ jobs: run: | cat << EOF > test-values.yaml name: "cnpg" - instances: 3 - bootstrap: - initdb: - database: app - owner: app - secret: - name: null certificates: server: enabled: true @@ -101,20 +94,6 @@ jobs: enabled: true username: - "app" - monitoring: - enablePodMonitor: false - postgresql: - pg_hba: - - hostssl all all all cert - resources: - requests: - cpu: "50m" - memory: "256Mi" - limits: - cpu: "1000m" - memory: "1024Mi" - storage: - size: 1Gi testApp: enabled: false EOF