Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/workflows/ci-helm-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
25 changes: 4 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion charts/cloudnative-pg-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion charts/cloudnative-pg-cluster/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)
6 changes: 3 additions & 3 deletions charts/cloudnative-pg-cluster/templates/test-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
6 changes: 6 additions & 0 deletions charts/cloudnative-pg-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading