Skip to content

Commit

Permalink
Merge pull request #24 from small-hack/fix-bootstrap
Browse files Browse the repository at this point in the history
fix conflict between initdb and recovery options in bootstrap menu
  • Loading branch information
cloudymax authored Nov 9, 2023
2 parents 4febe31 + 1887555 commit d0d7c47
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
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: 0.3.5
version: 0.3.6

maintainers:
- name: "cloudymax"
Expand Down
3 changes: 2 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: 0.3.5](https://img.shields.io/badge/Version-0.3.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.3.6](https://img.shields.io/badge/Version-0.3.6-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 @@ -34,6 +34,7 @@ Create postgres tenant clusters managed by the CNPG Operator
| certificates.server.serverTLSSecret | string | `""` | name of existing Kubernetes Secret for the postgresql server TLS cert, ignored if certificates.generate is true |
| certificates.user.enabled | bool | `false` | create a certificate for a user to connect to postgres using CertManager requires server and client certificate generation enabled |
| certificates.user.username | string | `"app"` | name of the user to create a cert for, eg: the DbOwner specified earlier. This data populated into the commonName field of the certificate. |
| externalClusters | list | `[]` | |
| instances | int | `3` | |
| monitoring.enablePodMonitor | bool | `false` | enable monitoring via Prometheus |
| name | string | `"cnpg"` | |
Expand Down
15 changes: 12 additions & 3 deletions charts/cloudnative-pg-cluster/templates/cnpg_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@ spec:
{{- end }}
storage:
size: {{ .Values.storage.size }}
{{- with .Values.bootstrap }}
bootstrap:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.bootstrap.initdb }}
{{- with .Values.bootstrap.initdb }}
initdb:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}
{{- if .Values.bootstrap.recovery }}
{{- with .Values.bootstrap.recovery }}
recovery:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}
{{- if or .Values.certificates.server.enabled .Values.certificates.client.enabled }}
certificates:
{{- if and .Values.certificates.server.enabled }}
Expand Down
4 changes: 2 additions & 2 deletions charts/cloudnative-pg-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ bootstrap:
# postInitSQL:
# - CREATE ROLE friend
# Specify an external cluster to bootstrap from
# recovery:
# source: clusterBackup
# recovery:
# source: clusterBackup

externalClusters: []
# # -- name of external/existing cluster
Expand Down

0 comments on commit d0d7c47

Please sign in to comment.