Skip to content

Commit f80110f

Browse files
committed
Moving PG Major Upgrades API to postgres-operator repo.
[SC-16347]
1 parent 7254fa4 commit f80110f

File tree

16 files changed

+3139
-33
lines changed

16 files changed

+3139
-33
lines changed

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,16 @@ generate-crd:
289289
GOBIN='$(CURDIR)/hack/tools' ./hack/controller-generator.sh \
290290
crd:crdVersions='v1' \
291291
paths='./pkg/apis/...' \
292-
output:dir='build/crd/generated' # build/crd/generated/{group}_{plural}.yaml
292+
output:dir='build/crd/postgresclusters/generated' # build/crd/generated/{group}_{plural}.yaml
293293
@
294-
@# Kustomize returns lots of objects. The following only makes sense when there is one CRD.
295-
[ "$$(ls -1 ./build/crd/generated)" = 'postgres-operator.crunchydata.com_postgresclusters.yaml' ]
296-
$(PGO_KUBE_CLIENT) kustomize ./build/crd > ./config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml
294+
GOBIN='$(CURDIR)/hack/tools' ./hack/controller-generator.sh \
295+
crd:crdVersions='v1' \
296+
paths='./pkg/apis/...' \
297+
output:dir='build/crd/pgupgrades/generated' # build/crd/generated/{group}_{plural}.yaml
298+
@
299+
$(PGO_KUBE_CLIENT) kustomize ./build/crd/postgresclusters > ./config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml
300+
$(PGO_KUBE_CLIENT) kustomize ./build/crd/pgupgrades > ./config/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml
301+
297302

298303
generate-crd-docs:
299304
GOBIN='$(CURDIR)/hack/tools' $(GO) install fybrik.io/crdoc@v0.5.2

build/crd/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/generated/
1+
/postgresclusters/generated/
2+
/pgupgrades/generated/
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- generated/postgres-operator.crunchydata.com_pgupgrades.yaml
6+
7+
patches:
8+
# Remove the zero status field included by controller-gen@v0.8.0. These zero
9+
# values conflict with the CRD controller in Kubernetes before v1.22.
10+
# - https://github.com/kubernetes-sigs/controller-tools/pull/630
11+
# - https://pr.k8s.io/100970
12+
- target:
13+
group: apiextensions.k8s.io
14+
version: v1
15+
kind: CustomResourceDefinition
16+
name: pgupgrades.postgres-operator.crunchydata.com
17+
patch: |-
18+
- op: remove
19+
path: /status
20+
- target:
21+
group: apiextensions.k8s.io
22+
version: v1
23+
kind: CustomResourceDefinition
24+
name: pgupgrades.postgres-operator.crunchydata.com
25+
# The version below should match the version on the PostgresCluster CRD
26+
patch: |-
27+
- op: add
28+
path: "/metadata/labels"
29+
value:
30+
app.kubernetes.io/name: pgo
31+
app.kubernetes.io/version: 5.2.0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

config/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml

Lines changed: 1076 additions & 0 deletions
Large diffs are not rendered by default.

docs/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ imageCrunchyPGBackrestPrivate = "registry.crunchydata.com/crunchydata/crunch
3535
imageCrunchyPGBouncer = "registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.17-1"
3636
imageCrunchyExporter = "registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-5.2.0-0"
3737
imageCrunchyPGAdmin = "registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-4.30-4"
38-
imageCrunchyPGUpgrade = ""
38+
imageCrunchyPGUpgrade = "registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi8-5.2.0-0"
3939
operatorRepository = "registry.developers.crunchydata.com/crunchydata/postgres-operator"
4040
operatorRepositoryPrivate = "registry.crunchydata.com/crunchydata/postgres-operator"
4141
postgresOperatorTag = "ubi8-5.2.0-0"

0 commit comments

Comments
 (0)