Skip to content

Commit

Permalink
Merge pull request #27 from jouve/postgresql
Browse files Browse the repository at this point in the history
[postgresql] bitnami/common 2.10.x
  • Loading branch information
jouve authored Sep 10, 2023
2 parents 847a6aa + ec05bea commit 0ce8a2a
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 54 deletions.
6 changes: 3 additions & 3 deletions charts/postgresql/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.8.0
digest: sha256:8ab32897fda14bd026e41d2e532e07b1ea04a31588031cd50aa06d31748d858a
generated: "2023-08-21T11:11:19.253395+02:00"
version: 2.10.1
digest: sha256:3f8cae6c1c6625ed483dbccffae6e274006e5bb3d79b2f1abba15c765d2b6a04
generated: "2023-09-09T20:54:39.474212926+02:00"
7 changes: 4 additions & 3 deletions charts/postgresql/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
apiVersion: v2
name: postgresql
description: Deploy postgresql using cloudnative-pg operator
icon: https://raw.githubusercontent.com/cloudnative-pg/artwork/main/cloudnativepg-logo.svg
type: application
keywords:
- database
- postgresql
- cloudnative-pg
version: 0.4.5
appVersion: "15.3"
version: 0.5.0
appVersion: "15.4"
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
Expand All @@ -21,6 +22,6 @@ maintainers:
annotations:
artifacthub.io/images: |
- name: postgresql
image: ghcr.io/cloudnative-pg/postgresql:15.3-4
image: ghcr.io/cloudnative-pg/postgresql:15.4-8
artifacthub.io/recommendations: |
- url: https://artifacthub.io/packages/helm/cloudnative-pg/cloudnative-pg
5 changes: 5 additions & 0 deletions charts/postgresql/ci/backup-existing-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
backup:
enabled: true
endpointURL: https://my.s3.local
s3:
existingSecret: foo
6 changes: 6 additions & 0 deletions charts/postgresql/ci/backup-obc-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
backup:
enabled: true
endpointURL: https://my.s3.local
s3:
objectBucketClaim:
enabled: true
2 changes: 2 additions & 0 deletions charts/postgresql/ci/cert-manager-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
certificates:
mode: cert-manager
1 change: 1 addition & 0 deletions charts/postgresql/ci/default-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
9 changes: 3 additions & 6 deletions charts/postgresql/templates/backup/objectbucketclaim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ kind: ObjectBucketClaim
metadata:
name: {{ template "common.names.fullname" . }}-backup
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- 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 }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" . ) | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
spec:
bucketName: {{ if .Values.backup.bucketName }}{{ tpl .Values.backup.bucketName $ }}{{ else }}{{ include "common.names.namespace" . }}-{{ template "common.names.fullname" . }}-backup{{ end }}
Expand Down
9 changes: 3 additions & 6 deletions charts/postgresql/templates/backup/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ kind: Role
metadata:
name: {{ template "common.names.fullname" . }}-backup
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- 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 }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" . ) | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
Expand Down
9 changes: 3 additions & 6 deletions charts/postgresql/templates/backup/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ kind: RoleBinding
metadata:
name: {{ template "common.names.fullname" . }}-backup
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- 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 }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" . ) | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
Expand Down
9 changes: 3 additions & 6 deletions charts/postgresql/templates/backup/scheduledbackup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ kind: ScheduledBackup
metadata:
name: {{ template "common.names.fullname" . }}-backup
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- 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 }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" . ) | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
spec:
schedule: {{ .Values.backup.scheduled.schedule }}
Expand Down
5 changes: 1 addition & 4 deletions charts/postgresql/templates/cert-manager/issuer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ kind: Issuer
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- with .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" . ) | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ kind: Certificate
metadata:
name: {{ template "common.names.fullname" . }}-replication
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- with .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" . ) | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ kind: Certificate
metadata:
name: {{ template "common.names.fullname" . }}-server
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- with .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" . ) | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
Expand Down
11 changes: 4 additions & 7 deletions charts/postgresql/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ kind: Cluster
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- with .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" . ) | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -38,7 +35,7 @@ spec:
backup:
barmanObjectStore:
{{- if .Values.backup.s3.enabled }}
endpointURL: {{ .Values.backup.endpointURL }}
endpointURL: {{ .Values.backup.endpointURL | required "backup.endpointURL required when backup.s3 is enabled" }}
{{- with .Values.backup.endpointCASecret }}
endpointCA:
name: {{ . }}
Expand All @@ -47,10 +44,10 @@ spec:
destinationPath: s3://{{ with .Values.backup.s3.bucketName }}{{ . }}{{ else }}{{ include "common.names.namespace" . }}-{{ template "common.names.fullname" . }}-backup{{ end }}/
s3Credentials:
accessKeyId:
name: {{ if .Values.backup.s3.objectBucketClaim.enabled }}{{ template "common.names.fullname" . }}-backup{{ else }}{{ .Values.backup.s3.existingSecret }}{{ end }}
name: {{ if .Values.backup.s3.objectBucketClaim.enabled }}{{ template "common.names.fullname" . }}-backup{{ else }}{{ .Values.backup.s3.existingSecret | required "backup.s3.existingSecret required when backup.s3.bucketName and backup.s3.objectBucketClaim is not enabled" }}{{ end }}
key: AWS_ACCESS_KEY_ID
secretAccessKey:
name: {{ if .Values.backup.s3.objectBucketClaim.enabled }}{{ template "common.names.fullname" . }}-backup{{ else }}{{ .Values.backup.s3.existingSecret }}{{ end }}
name: {{ if .Values.backup.s3.objectBucketClaim.enabled }}{{ template "common.names.fullname" . }}-backup{{ else }}{{ .Values.backup.s3.existingSecret | required "backup.s3.existingSecret required when backup.s3.bucketName and backup.s3.objectBucketClaim is not enabled" }}{{ end }}
key: AWS_SECRET_ACCESS_KEY
{{- end }}
retentionPolicy: {{ .Values.backup.retentionPolicy | quote }}
Expand Down
5 changes: 1 addition & 4 deletions charts/postgresql/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ kind: NetworkPolicy
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- with .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" . ) | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/postgresql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ affinity:
image:
registry: ghcr.io
repository: cloudnative-pg/postgresql
tag: 15.3-4
tag: 15.4-8
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
Expand Down

0 comments on commit 0ce8a2a

Please sign in to comment.