Skip to content

Commit 3dc4784

Browse files
ltellesfljmckulkAnthony Landrethjaitaiwandsessler7
authored
[DEV-12476] Get 5.7.0 update (#7)
* Updates for August Release * Bump monitoring versions * feat: Add customised env var and feature flags This change adds 3 new features: - The ability to enable feature flags with the .Values.features key - The ability to add extra environment variables to the container env - The ability to completely override env variables (not recommended) Closes CrunchyData#262 * Update pgAdmin example - add user management to pgAdmin example - Deploy with `internal` only auth by default * Define use in postgres example * Remove Images from examples - Images are defined in the operator deployment as RELATED_IMAGES. We don't need to define them in two places. - Leave a commented image field in the postgres example * Changes to operator installers for 5.7 release. * Remove old singlenamespace installer artifacts. * Fix broken hyperlinks. * patching Kustomize monitoring installer --------- Co-authored-by: jmckulk <joseph.mckulka@crunchydata.com> Co-authored-by: Joseph Mckulka <16840147+jmckulk@users.noreply.github.com> Co-authored-by: Anthony Landreth <tony.landreth@crunchydata.com> Co-authored-by: Daniel Holmes <daniel.holmes@djcentric.com> Co-authored-by: Drew Sessler <drew.sessler@crunchydata.com> Co-authored-by: crunchy-containers-bot <sysops+containersbot@crunchydata.com>
1 parent 2e47e15 commit 3dc4784

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+36527
-34262
lines changed

helm/install/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ description: Installer for PGO, the open source Postgres Operator from Crunchy D
44

55
type: application
66
# The version below should match the version on the PostgresCluster CRD
7-
version: 5.6.0
8-
appVersion: 5.6.0
7+
version: 5.7.0
8+
appVersion: 5.7.0

helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml

Lines changed: 271 additions & 276 deletions
Large diffs are not rendered by default.

helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml

Lines changed: 1724 additions & 1516 deletions
Large diffs are not rendered by default.

helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml

Lines changed: 1107 additions & 1009 deletions
Large diffs are not rendered by default.

helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 14977 additions & 14143 deletions
Large diffs are not rendered by default.

helm/install/templates/_helpers.tpl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,36 @@ imagePullSecrets:
9898
value: {{ $object.image | quote }}
9999
{{- end }}
100100
{{- end }}
101+
102+
103+
{{- define "install.defaultEnv" -}}
104+
- name: CRUNCHY_DEBUG
105+
value: {{ .Values.debug | ne false | quote }}
106+
- name: PGO_NAMESPACE
107+
valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
108+
{{- if .Values.singleNamespace }}
109+
- name: PGO_TARGET_NAMESPACE
110+
valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
111+
{{- end }}
112+
{{- if .Values.workers }}
113+
- name: PGO_WORKERS
114+
value: {{ .Values.workers | quote }}
115+
{{- end }}
116+
{{- include "install.relatedImages" . }}
117+
{{- if .Values.disable_check_for_upgrades }}
118+
- name: CHECK_FOR_UPGRADES
119+
value: "false"
120+
{{- end }}
121+
{{- if .Values.features }}
122+
{{- $value := .Values.features }}
123+
- name: PGO_FEATURE_GATES
124+
{{- $out := "" -}}
125+
{{- if eq (kindOf $value) "map" -}}
126+
{{- range $key, $val := $value -}}
127+
{{- $out = (print $out $key "=" $val ",") -}}
128+
{{- end }}
129+
{{- end }}
130+
value: "{{ trimSuffix "," $out }}"
131+
{{- end }}
132+
{{- end }}{{/* define */}}
133+

helm/install/templates/manager.yaml

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
{{- include "install.labels" . | nindent 4 }}
88
{{- include "install.clusterLabels" . | nindent 4 }}
99
spec:
10-
replicas: 1
10+
replicas: {{ .Values.replicas }}
1111
strategy: { type: Recreate }
1212
selector:
1313
matchLabels:
@@ -24,22 +24,19 @@ spec:
2424
- name: operator
2525
image: {{ required ".Values.controllerImages.cluster is required" .Values.controllerImages.cluster | quote }}
2626
env:
27-
- name: CRUNCHY_DEBUG
28-
value: {{ .Values.debug | ne false | quote }}
29-
- name: PGO_NAMESPACE
30-
valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
31-
{{- if .Values.singleNamespace }}
32-
- name: PGO_TARGET_NAMESPACE
33-
valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
27+
- name: PGO_INSTALLER
28+
value: helm
29+
- name: PGO_INSTALLER_ORIGIN
30+
value: examples-repo
31+
- name: PGO_CONTROLLER_LEASE_NAME
32+
value: {{ .Values.pgoControllerLeaseName }}
33+
{{- if .Values.envOverride }}
34+
{{- toYaml .Values.envOverride | nindent 10 }}
35+
{{- else -}}
36+
{{- include "install.defaultEnv" . | nindent 10 }}
3437
{{- end }}
35-
{{- if .Values.workers }}
36-
- name: PGO_WORKERS
37-
value: {{ .Values.workers | quote }}
38-
{{- end }}
39-
{{- include "install.relatedImages" . | indent 8 }}
40-
{{- if .Values.disable_check_for_upgrades }}
41-
- name: CHECK_FOR_UPGRADES
42-
value: "false"
38+
{{- if .Values.extraEnv }}
39+
{{- toYaml .Values.extraEnv | nindent 10 }}
4340
{{- end }}
4441
{{- if .Values.resources.controller }}
4542
resources:
@@ -52,3 +49,15 @@ spec:
5249
capabilities: { drop: [ALL] }
5350
readOnlyRootFilesystem: true
5451
runAsNonRoot: true
52+
livenessProbe:
53+
httpGet:
54+
path: /readyz
55+
port: 8081
56+
initialDelaySeconds: 15
57+
periodSeconds: 20
58+
readinessProbe:
59+
httpGet:
60+
path: /healthz
61+
port: 8081
62+
initialDelaySeconds: 5
63+
periodSeconds: 10

helm/install/templates/role.yaml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ rules:
1313
- configmaps
1414
- persistentvolumeclaims
1515
- secrets
16+
- serviceaccounts
1617
- services
1718
verbs:
1819
- create
@@ -57,16 +58,6 @@ rules:
5758
- list
5859
- patch
5960
- watch
60-
- apiGroups:
61-
- ''
62-
resources:
63-
- serviceaccounts
64-
verbs:
65-
- create
66-
- get
67-
- list
68-
- patch
69-
- watch
7061
- apiGroups:
7162
- apps
7263
resources:
@@ -91,6 +82,15 @@ rules:
9182
- list
9283
- patch
9384
- watch
85+
- apiGroups:
86+
- coordination.k8s.io
87+
resources:
88+
- leases
89+
verbs:
90+
- create
91+
- get
92+
- update
93+
- watch
9494
- apiGroups:
9595
- policy
9696
resources:
@@ -161,6 +161,18 @@ rules:
161161
- roles
162162
verbs:
163163
- create
164+
- delete
165+
- get
166+
- list
167+
- patch
168+
- watch
169+
- apiGroups:
170+
- snapshot.storage.k8s.io
171+
resources:
172+
- volumesnapshots
173+
verbs:
174+
- create
175+
- delete
164176
- get
165177
- list
166178
- patch

helm/install/values.yaml

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,36 @@
22
# controllerImages are used to run the operator's controllers.
33
# The cluster image defined below runs the PostgresCluster and PGUpgrade controllers.
44
controllerImages:
5-
cluster: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi8-5.6.0-0
5+
cluster: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi8-5.7.0-0
66

77
# relatedImages are used when an image is omitted from PostgresCluster, PGAdmin or PGUpgrade specs.
88
relatedImages:
9+
postgres_17:
10+
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-17.0-0
11+
postgres_17_gis_3.4:
12+
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-17.0-3.4-0
913
postgres_16:
10-
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-16.3-1
14+
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-16.4-2
1115
postgres_16_gis_3.4:
12-
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.3-3.4-1
16+
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.4-3.4-2
1317
postgres_16_gis_3.3:
14-
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.3-3.3-1
18+
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.4-3.3-2
1519
postgres_15:
16-
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-15.7-1
20+
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-15.8-2
1721
postgres_15_gis_3.3:
18-
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-15.7-3.3-1
22+
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-15.8-3.3-2
1923
pgadmin:
20-
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-4.30-26
24+
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-4.30-31
2125
pgbackrest:
22-
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.51-1
26+
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.53.1-0
2327
pgbouncer:
24-
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.22-1
28+
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.23-0
2529
pgexporter:
26-
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-0.15.0-7
30+
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-0.15.0-12
2731
pgupgrade:
28-
image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi8-5.6.0-0
32+
image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi8-5.7.0-0
2933
standalone_pgadmin:
30-
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-8.6-1
34+
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-8.12-0
3135

3236
# singleNamespace controls where PGO watches for PostgresClusters. When false,
3337
# PGO watches for and responds to PostgresClusters in all namespaces. When true,
@@ -37,16 +41,51 @@ singleNamespace: false
3741
# debug allows you to enable or disable the "debug" level of logging.
3842
debug: true
3943

44+
# pgoControllerLeaseName sets the name of the Lease that holds the Leader Election
45+
# Lock, thereby enabling High Availability for the Operator. If this is unset,
46+
# Leader Election will be turned off. To utilize the Leader Election and make PGO
47+
# highly available you will also need to increment the replica count.
48+
pgoControllerLeaseName: cpk-leader-election-lease
49+
50+
# replicas sets the number of PGO instances.
51+
# Warning: This should only be greater than 1 if pgoControllerLeaseName is set!
52+
replicas: 1
53+
4054
# imagePullSecretNames is a list of secret names to use for pulling controller images.
4155
# More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
4256
imagePullSecretNames: []
4357

4458
# Resource configuration of the PostgresCluster and PGUpgrade controllers.
4559
resources:
4660
controller: {}
47-
4861
# Define custom labels for PGO pods
4962
# Note: Defining labels that overlap with any Crunchy Data label, for example,
5063
# postgres-operator.crunchydata.com, will cause an error
5164
# customPodLabels:
5265
# example.com: custom-label
66+
67+
# Enable feature gates for PGO, by explicitly seting the value for the flags
68+
# features:
69+
# AutoGrowVolumes: true
70+
# Feature2: false
71+
# Feature3: somevalue
72+
73+
# Define extra environment variables for the chart, which will get added to the container's env
74+
# extraEnv:
75+
# - name: MY_VAR
76+
# value: "myvalue"
77+
# - name: MY_CONFIGMAP_VAR
78+
# valueFrom:
79+
# configMapKeyRef:
80+
# name: s3-settings
81+
# key: bucket
82+
# - name: MY_SECRET_VAR
83+
# valueFrom:
84+
# secretKeyRef:
85+
# name: s3-secret
86+
# key: key
87+
88+
# Override environment variables entirely !!DANGEROUS!!
89+
# envOverride:
90+
# - name: PG_DEBUG
91+
# value: "true"

helm/postgres/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ postgresVersion: 16
198198
# # keySecret is the S3 key secret. This is stored in a Secret.
199199
# keySecret: ""
200200
# # keyType can be configured to enable IAM integration via AssumeRole
201-
# # For more info, see the documentation at https://access.crunchydata.com/documentation/postgres-operator/v5/tutorial/backups/#using-an-aws-integrated-identity-provider-and-role
201+
# # For more info, see the documentation at https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/backups-disaster-recovery/backups#using-an-aws-integrated-identity-provider-and-role
202202
# keyType: ""
203203
# # encryptionPassphrase is an optional parameter to enable encrypted backups
204204
# # with pgBackRest. This is encrypted by pgBackRest and does not use S3's

0 commit comments

Comments
 (0)