Skip to content

Commit e368934

Browse files
authored
Merge pull request #46 from small-hack/update-cluster-cert-names
update the DNS names for the cluster_certificates.yaml
2 parents 8e651b5 + 7ebb7ed commit e368934

4 files changed

Lines changed: 27 additions & 11 deletions

File tree

charts/cloudnative-pg-cluster/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: cnpg-cluster
33
description: Create postgres tenant clusters managed by the CNPG Operator
44
type: application
5-
version: 1.1.0
5+
version: 1.1.1
66

77
dependencies:
88
- name: cluster

charts/cloudnative-pg-cluster/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# cnpg-cluster
22

3-
![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)
3+
![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
44

55
Create postgres tenant clusters managed by the CNPG Operator
66

@@ -41,6 +41,7 @@ Create postgres tenant clusters managed by the CNPG Operator
4141
| cnpgCluster.cluster.instances | int | `3` | Number of instances |
4242
| cnpgCluster.cluster.postgresql.pg_hba | list | `["hostnossl all all 0.0.0.0/0 reject","hostssl all all 0.0.0.0/0 cert clientcert=verify-full"]` | records for the pg_hba.conf file. ref: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html |
4343
| cnpgCluster.enabled | bool | `false` | 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 |
44+
| cnpgCluster.fullnameOverride | string | `""` | |
4445
| cnpgCluster.mode | string | `"standalone"` | |
4546
| cnpgCluster.primaryUpdateStrategy | string | `"unsupervised"` | |
4647
| cnpgCluster.type | string | `"postgresql"` | |

charts/cloudnative-pg-cluster/templates/cluster_certificates.yaml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,27 @@ spec:
4747
usages:
4848
- server auth
4949
dnsNames:
50-
- "{{ .Values.name }}-rw"
51-
- "{{ .Values.name }}-rw.{{ .Release.Namespace }}"
52-
- "{{ .Values.name }}-rw.{{ .Release.Namespace }}.svc"
53-
- "{{ .Values.name }}-r"
54-
- "{{ .Values.name }}-r.{{ .Release.Namespace }}"
55-
- "{{ .Values.name }}-r.{{ .Release.Namespace }}.svc"
56-
- "{{ .Values.name }}-ro"
57-
- "{{ .Values.name }}-ro.{{ .Release.Namespace }}"
58-
- "{{ .Values.name }}-ro.{{ .Release.Namespace }}.svc"
50+
{{- if .Values.cnpgCluster.fullnameOverride }}
51+
- "{{ .Values.cnpgCluster.fullnameOverride }}-rw"
52+
- "{{ .Values.cnpgCluster.fullnameOverride }}-rw.{{ .Release.Namespace }}"
53+
- "{{ .Values.cnpgCluster.fullnameOverride }}-rw.{{ .Release.Namespace }}.svc"
54+
- "{{ .Values.cnpgCluster.fullnameOverride }}-r"
55+
- "{{ .Values.cnpgCluster.fullnameOverride }}-r.{{ .Release.Namespace }}"
56+
- "{{ .Values.cnpgCluster.fullnameOverride }}-r.{{ .Release.Namespace }}.svc"
57+
- "{{ .Values.cnpgCluster.fullnameOverride }}-ro"
58+
- "{{ .Values.cnpgCluster.fullnameOverride }}-ro.{{ .Release.Namespace }}"
59+
- "{{ .Values.cnpgCluster.fullnameOverride }}-ro.{{ .Release.Namespace }}.svc"
60+
{{- else }}
61+
- "cnpg-cluster-rw"
62+
- "cnpg-cluster-rw.{{ .Release.Namespace }}"
63+
- "cnpg-cluster-rw.{{ .Release.Namespace }}.svc"
64+
- "cnpg-cluster-r"
65+
- "cnpg-cluster-r.{{ .Release.Namespace }}"
66+
- "cnpg-cluster-r.{{ .Release.Namespace }}.svc"
67+
- "cnpg-cluster-ro"
68+
- "cnpg-cluster-ro.{{ .Release.Namespace }}"
69+
- "cnpg-cluster-ro.{{ .Release.Namespace }}.svc"
70+
{{- end }}
5971
issuerRef:
6072
name: "{{ .Values.name }}-server-ca-issuer"
6173
kind: Issuer

charts/cloudnative-pg-cluster/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,14 @@ cnpgCluster:
5353
# https://github.com/cloudnative-pg/charts/blob/main/charts/cluster/values.yaml
5454
enabled: false
5555
type: postgresql
56+
5657
version:
5758
postgresql: "16"
5859

5960
mode: standalone
6061

62+
fullnameOverride: ""
63+
6164
# -- see: https://cloudnative-pg.io/docs/1.28/certificates#client-certificate
6265
certificates: {}
6366
## examples if using our certificates features of this chart.

0 commit comments

Comments
 (0)