Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions config/components/images-by-tag/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
kind: Component
images:
- name: image-pgadmin
newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4
newTag: ubi9-9.8-2550
- name: image-pgbackrest
newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest
newTag: ubi9-2.56.0-2550
- name: image-pgbouncer
newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer
newTag: ubi9-1.24-2550
- name: image-postgres-exporter
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter
newTag: ubi9-0.18.1-2550
- name: image-postgres-operator-6.0
newName: registry.developers.crunchydata.com/crunchydata/postgres-operator
newTag: ubi9-6.0.0-0
- name: image-postgres-operator-5.8
newName: registry.developers.crunchydata.com/crunchydata/postgres-operator
newTag: ubi9-5.8.6-0
- name: image-crunchy-postgres-15
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres
newTag: ubi9-15.15-2550
- name: image-crunchy-postgres-16
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres
newTag: ubi9-16.11-2550
- name: image-crunchy-postgres-17
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres
newTag: ubi9-17.7-2550
- name: image-crunchy-postgres-18
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres
newTag: ubi9-18.1-2550
- name: image-crunchy-upgrade
newName: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade
newTag: ubi9-18.1-2550
- name: image-crunchy-postgres-15-gis-3.3
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
newTag: ubi9-15.15-3.3-2550
- name: image-crunchy-postgres-16-gis-3.3
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
newTag: ubi9-16.11-3.3-2550
- name: image-crunchy-postgres-16-gis-3.4
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
newTag: ubi9-16.11-3.4-2550
- name: image-crunchy-postgres-17-gis-3.4
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
newTag: ubi9-17.7-3.4-2550
- name: image-crunchy-postgres-17-gis-3.5
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
newTag: ubi9-17.7-3.5-2550
- name: image-crunchy-postgres-17-gis-3.6
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
newTag: ubi9-17.7-3.6-2550
- name: image-crunchy-postgres-18-gis-3.6
newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis
newTag: ubi9-18.1-3.6-2550
27 changes: 27 additions & 0 deletions config/components/single-namespace/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
kind: Component

patches:
- target:
kind: ClusterRole
patch: |-
- { op: replace, path: /kind, value: Role }
- target:
kind: ClusterRoleBinding
patch: |-
- { op: replace, path: /kind, value: RoleBinding }
- { op: replace, path: /roleRef/kind, value: Role }
- target:
kind: Deployment
patch: |-
kind: Deployment
metadata: { name: ignored }
spec:
template:
spec:
containers:
- name: operator
env:
- name: CPK_TARGET_NAMESPACE
valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
- name: PGO_TARGET_NAMESPACE
value: '$(CPK_TARGET_NAMESPACE)'
31 changes: 24 additions & 7 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: postgres-operator

labels:
- includeSelectors: false
includeTemplates: true
pairs:
app.kubernetes.io/name: pgo
app.kubernetes.io/version: 6.0.0
- includeSelectors: true
includeTemplates: true
pairs:
# Note: this label differs from the label set in postgres-operator-examples
postgres-operator.crunchydata.com/control-plane: postgres-operator

resources:
- ../crd
- ../rbac
- ../rbac/cluster
- ../manager

images:
- name: postgres-operator
newName: registry.developers.crunchydata.com/crunchydata/postgres-operator
newTag: latest
components:
- ../components/images-by-tag

patches:
- patch: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: pgo
spec:
template:
spec:
containers:
- name: operator
env:
- name: PGO_FEATURE_GATES
value: ""
10 changes: 8 additions & 2 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

configurations:
- kustomize_related_images.yaml

resources:
- manager.yaml
- manager.yaml

images:
- name: postgres-operator
newName: image-postgres-operator-6.0
12 changes: 12 additions & 0 deletions config/manager/kustomize_related_images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This configures the built-in ImageTagTransformer to replace image identifiers
# in Deployment environment variables as well as image fields.
#
# See: https://kubectl.docs.kubernetes.io/references/kustomize/builtins/

images:
- group: apps
kind: Deployment
path: spec/template/spec/containers/env/value
- group: apps
kind: Deployment
path: spec/template/spec/containers/image
61 changes: 41 additions & 20 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,74 @@ spec:
strategy: { type: Recreate }
template:
spec:
serviceAccountName: pgo
containers:
- name: operator
image: postgres-operator
env:
- name: PGO_INSTALLER
value: kustomize
- name: PGO_INSTALLER_ORIGIN
value: postgres-operator-repo
value: examples-repo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
value: examples-repo
value: postgres-operator-repo

- name: PGO_CONTROLLER_LEASE_NAME
value: cpk-leader-election-lease
- name: PGO_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
valueFrom: { fieldRef: { fieldPath: metadata.namespace } }
- name: CRUNCHY_DEBUG
value: "true"
- name: RELATED_IMAGE_POSTGRES_15
value: image-crunchy-postgres-15
- name: RELATED_IMAGE_POSTGRES_15_GIS_3.3
value: image-crunchy-postgres-15-gis-3.3
- name: RELATED_IMAGE_POSTGRES_16
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-16.11-2547"
value: image-crunchy-postgres-16
- name: RELATED_IMAGE_POSTGRES_16_GIS_3.3
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.11-3.3-2547"
value: image-crunchy-postgres-16-gis-3.3
- name: RELATED_IMAGE_POSTGRES_16_GIS_3.4
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.11-3.4-2547"
value: image-crunchy-postgres-16-gis-3.4
- name: RELATED_IMAGE_POSTGRES_17
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.7-2547"
value: image-crunchy-postgres-17
- name: RELATED_IMAGE_POSTGRES_17_GIS_3.4
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.7-3.4-2547"
value: image-crunchy-postgres-17-gis-3.4
- name: RELATED_IMAGE_POSTGRES_17_GIS_3.5
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.7-3.5-2547"
value: image-crunchy-postgres-17-gis-3.5
- name: RELATED_IMAGE_POSTGRES_17_GIS_3.6
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.7-3.5-2547"
value: image-crunchy-postgres-17-gis-3.6
- name: RELATED_IMAGE_POSTGRES_18
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-18.1-2547"
value: image-crunchy-postgres-18
- name: RELATED_IMAGE_POSTGRES_18_GIS_3.6
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-18.1-3.6-2547"
value: image-crunchy-postgres-18-gis-3.6
- name: RELATED_IMAGE_PGBACKREST
value: "registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.56.0-2547"
value: image-pgbackrest
- name: RELATED_IMAGE_PGBOUNCER
value: "registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi9-1.24-2547"
value: image-pgbouncer
- name: RELATED_IMAGE_PGEXPORTER
value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi9-0.18.1-2547"
value: image-postgres-exporter
- name: RELATED_IMAGE_PGUPGRADE
value: "registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi9-18.1-2547"
value: image-crunchy-upgrade
- name: RELATED_IMAGE_STANDALONE_PGADMIN
value: "registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi9-9.8-2547"
value: image-pgadmin
- name: RELATED_IMAGE_COLLECTOR
value: "registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.5-0"
value: image-postgres-operator-6.0
securityContext:
seccompProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
capabilities: { drop: [ALL] }
readOnlyRootFilesystem: true
runAsNonRoot: true
serviceAccountName: pgo
ports:
- containerPort: 8443
name: metrics
livenessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
3 changes: 0 additions & 3 deletions config/namespace/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- namespace.yaml
4 changes: 4 additions & 0 deletions config/rbac/cluster/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resources:
- role_binding.yaml
- role.yaml
- service_account.yaml
Loading
Loading