Skip to content

Commit e489ca5

Browse files
sfc-gh-jmckulkajmckulk
authored andcommitted
Update Installers in postgres-operator
We are moving our developer installers from the postgres-operator-examples repo to the postgres-operator. Note: These images might not exist, check the Releases page for current images. https://github.com/CrunchyData/postgres-operator/releases
1 parent a2fbaf3 commit e489ca5

File tree

13 files changed

+403
-31
lines changed

13 files changed

+403
-31
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
kind: Component
2+
images:
3+
- name: image-pgadmin
4+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4
5+
newTag: ubi9-9.8-2550
6+
- name: image-pgbackrest
7+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest
8+
newTag: ubi9-2.56.0-2550
9+
- name: image-pgbouncer
10+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer
11+
newTag: ubi9-1.24-2550
12+
- name: image-postgres-exporter
13+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter
14+
newTag: ubi9-0.18.1-2550
15+
- name: image-postgres-operator-6.0
16+
newName: registry.developers.crunchydata.com/crunchydata/postgres-operator
17+
newTag: ubi9-6.0.0-0
18+
- name: image-postgres-operator-5.8
19+
newName: registry.developers.crunchydata.com/crunchydata/postgres-operator
20+
newTag: ubi9-5.8.6-0
21+
- name: image-crunchy-postgres-15
22+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres
23+
newTag: ubi9-15.15-2550
24+
- name: image-crunchy-postgres-16
25+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres
26+
newTag: ubi9-16.11-2550
27+
- name: image-crunchy-postgres-17
28+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres
29+
newTag: ubi9-17.7-2550
30+
- name: image-crunchy-postgres-18
31+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres
32+
newTag: ubi9-18.1-2550
33+
- name: image-crunchy-upgrade
34+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade
35+
newTag: ubi9-18.1-2550
36+
- name: image-crunchy-postgres-15-gis-3.3
37+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
38+
newTag: ubi9-15.15-3.3-2550
39+
- name: image-crunchy-postgres-16-gis-3.3
40+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
41+
newTag: ubi9-16.11-3.3-2550
42+
- name: image-crunchy-postgres-16-gis-3.4
43+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
44+
newTag: ubi9-16.11-3.4-2550
45+
- name: image-crunchy-postgres-17-gis-3.4
46+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
47+
newTag: ubi9-17.7-3.4-2550
48+
- name: image-crunchy-postgres-17-gis-3.5
49+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
50+
newTag: ubi9-17.7-3.5-2550
51+
- name: image-crunchy-postgres-17-gis-3.6
52+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
53+
newTag: ubi9-17.7-3.6-2550
54+
- name: image-crunchy-postgres-18-gis-3.6
55+
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
56+
newTag: ubi9-18.1-3.6-2550
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
kind: Component
2+
3+
patches:
4+
- target:
5+
kind: ClusterRole
6+
patch: |-
7+
- { op: replace, path: /kind, value: Role }
8+
- target:
9+
kind: ClusterRoleBinding
10+
patch: |-
11+
- { op: replace, path: /kind, value: RoleBinding }
12+
- { op: replace, path: /roleRef/kind, value: Role }
13+
- target:
14+
kind: Deployment
15+
patch: |-
16+
kind: Deployment
17+
metadata: { name: ignored }
18+
spec:
19+
template:
20+
spec:
21+
containers:
22+
- name: operator
23+
env:
24+
- name: CPK_TARGET_NAMESPACE
25+
valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
26+
- name: PGO_TARGET_NAMESPACE
27+
value: '$(CPK_TARGET_NAMESPACE)'

config/default/kustomization.yaml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,37 @@
1-
apiVersion: kustomize.config.k8s.io/v1beta1
21
kind: Kustomization
32

43
namespace: postgres-operator
54

65
labels:
6+
- includeSelectors: false
7+
includeTemplates: true
8+
pairs:
9+
app.kubernetes.io/name: pgo
10+
app.kubernetes.io/version: 6.0.0
711
- includeSelectors: true
12+
includeTemplates: true
813
pairs:
9-
# Note: this label differs from the label set in postgres-operator-examples
1014
postgres-operator.crunchydata.com/control-plane: postgres-operator
1115

1216
resources:
1317
- ../crd
14-
- ../rbac
18+
- ../rbac/cluster
1519
- ../manager
1620

17-
images:
18-
- name: postgres-operator
19-
newName: registry.developers.crunchydata.com/crunchydata/postgres-operator
20-
newTag: latest
21+
components:
22+
- ../components/images-by-tag
23+
24+
patches:
25+
- patch: |-
26+
apiVersion: apps/v1
27+
kind: Deployment
28+
metadata:
29+
name: pgo
30+
spec:
31+
template:
32+
spec:
33+
containers:
34+
- name: operator
35+
env:
36+
- name: PGO_FEATURE_GATES
37+
value: ""

config/manager/kustomization.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
apiVersion: kustomize.config.k8s.io/v1beta1
21
kind: Kustomization
32

3+
configurations:
4+
- kustomize_related_images.yaml
5+
46
resources:
5-
- manager.yaml
7+
- manager.yaml
8+
9+
images:
10+
- name: postgres-operator
11+
newName: image-postgres-operator-6.0
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This configures the built-in ImageTagTransformer to replace image identifiers
2+
# in Deployment environment variables as well as image fields.
3+
#
4+
# See: https://kubectl.docs.kubernetes.io/references/kustomize/builtins/
5+
6+
images:
7+
- group: apps
8+
kind: Deployment
9+
path: spec/template/spec/containers/env/value
10+
- group: apps
11+
kind: Deployment
12+
path: spec/template/spec/containers/image

config/manager/manager.yaml

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ spec:
88
strategy: { type: Recreate }
99
template:
1010
spec:
11+
serviceAccountName: pgo
1112
containers:
1213
- name: operator
1314
image: postgres-operator
@@ -16,45 +17,65 @@ spec:
1617
value: kustomize
1718
- name: PGO_INSTALLER_ORIGIN
1819
value: postgres-operator-repo
20+
- name: PGO_CONTROLLER_LEASE_NAME
21+
value: cpk-leader-election-lease
1922
- name: PGO_NAMESPACE
20-
valueFrom:
21-
fieldRef:
22-
fieldPath: metadata.namespace
23+
valueFrom: { fieldRef: { fieldPath: metadata.namespace } }
2324
- name: CRUNCHY_DEBUG
2425
value: "true"
26+
- name: RELATED_IMAGE_POSTGRES_15
27+
value: image-crunchy-postgres-15
28+
- name: RELATED_IMAGE_POSTGRES_15_GIS_3.3
29+
value: image-crunchy-postgres-15-gis-3.3
2530
- name: RELATED_IMAGE_POSTGRES_16
26-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-16.11-2547"
31+
value: image-crunchy-postgres-16
2732
- name: RELATED_IMAGE_POSTGRES_16_GIS_3.3
28-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.11-3.3-2547"
33+
value: image-crunchy-postgres-16-gis-3.3
2934
- name: RELATED_IMAGE_POSTGRES_16_GIS_3.4
30-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.11-3.4-2547"
35+
value: image-crunchy-postgres-16-gis-3.4
3136
- name: RELATED_IMAGE_POSTGRES_17
32-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.7-2547"
37+
value: image-crunchy-postgres-17
3338
- name: RELATED_IMAGE_POSTGRES_17_GIS_3.4
34-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.7-3.4-2547"
39+
value: image-crunchy-postgres-17-gis-3.4
3540
- name: RELATED_IMAGE_POSTGRES_17_GIS_3.5
36-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.7-3.5-2547"
41+
value: image-crunchy-postgres-17-gis-3.5
3742
- name: RELATED_IMAGE_POSTGRES_17_GIS_3.6
38-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.7-3.5-2547"
43+
value: image-crunchy-postgres-17-gis-3.6
3944
- name: RELATED_IMAGE_POSTGRES_18
40-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-18.1-2547"
45+
value: image-crunchy-postgres-18
4146
- name: RELATED_IMAGE_POSTGRES_18_GIS_3.6
42-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-18.1-3.6-2547"
47+
value: image-crunchy-postgres-18-gis-3.6
4348
- name: RELATED_IMAGE_PGBACKREST
44-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.56.0-2547"
49+
value: image-pgbackrest
4550
- name: RELATED_IMAGE_PGBOUNCER
46-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi9-1.24-2547"
51+
value: image-pgbouncer
4752
- name: RELATED_IMAGE_PGEXPORTER
48-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi9-0.18.1-2547"
53+
value: image-postgres-exporter
4954
- name: RELATED_IMAGE_PGUPGRADE
50-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi9-18.1-2547"
55+
value: image-crunchy-upgrade
5156
- name: RELATED_IMAGE_STANDALONE_PGADMIN
52-
value: "registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi9-9.8-2547"
57+
value: image-pgadmin
5358
- name: RELATED_IMAGE_COLLECTOR
54-
value: "registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.5-0"
59+
value: image-postgres-operator-6.0
5560
securityContext:
61+
seccompProfile:
62+
type: RuntimeDefault
5663
allowPrivilegeEscalation: false
5764
capabilities: { drop: [ALL] }
5865
readOnlyRootFilesystem: true
5966
runAsNonRoot: true
60-
serviceAccountName: pgo
67+
ports:
68+
- containerPort: 8443
69+
name: metrics
70+
livenessProbe:
71+
httpGet:
72+
path: /readyz
73+
port: 8081
74+
initialDelaySeconds: 15
75+
periodSeconds: 20
76+
readinessProbe:
77+
httpGet:
78+
path: /healthz
79+
port: 8081
80+
initialDelaySeconds: 5
81+
periodSeconds: 10
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
apiVersion: kustomize.config.k8s.io/v1beta1
2-
kind: Kustomization
3-
41
resources:
52
- namespace.yaml
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resources:
2+
- role_binding.yaml
3+
- role.yaml
4+
- service_account.yaml

0 commit comments

Comments
 (0)