Skip to content

Commit 5764a35

Browse files
Merge branch 'main' into K8SPG-984-k8s-upgrade
2 parents 6774301 + c9033a5 commit 5764a35

988 files changed

Lines changed: 4223 additions & 12794 deletions

File tree

Some content is hidden

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

.github/dependabot.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,8 @@ updates:
4141
interval: weekly
4242
day: "tuesday"
4343
time: "01:00"
44-
44+
groups:
45+
k8s-ecosystem:
46+
patterns:
47+
- "k8s.io/*"
48+
- "sigs.k8s.io/*"

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ tools
1010
licenses/*
1111
!licenses/LICENSE.txt
1212
bin/
13-
/testing/kuttl/e2e-generated/
14-
/testing/kuttl/e2e-generated-other/
15-
/testing/kuttl/e2e-generated*/
1613

1714
# Test binary, build with 'go test -c'
1815
*.test

.golangci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ linters:
5757
deny:
5858
- pkg: net/http/httptest
5959
desc: Should be used only in tests.
60-
- pkg: testing/*
61-
desc: The "testing" packages should be used only in tests.
6260
- pkg: github.com/percona/percona-postgresql-operator/v2/internal/testing/*
6361
desc: The "internal/testing" packages should be used only in tests.
6462
- pkg: errors

Makefile

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ clean: clean-deprecated
5959
rm -f bin/postgres-operator
6060
rm -f config/rbac/role.yaml
6161
rm -rf licenses/*/
62-
[ ! -d testing/kuttl/e2e-generated ] || rm -r testing/kuttl/e2e-generated
63-
[ ! -d testing/kuttl/e2e-generated-other ] || rm -r testing/kuttl/e2e-generated-other
6462
rm -rf build/crd/generated build/crd/*/generated
6563
[ ! -f hack/tools/setup-envtest ] || rm hack/tools/setup-envtest
6664
[ ! -d hack/tools/envtest ] || { chmod -R u+w hack/tools/envtest && rm -r hack/tools/envtest; }
@@ -219,41 +217,6 @@ check-envtest-existing: createnamespaces
219217
$(GO_TEST) -count=1 -cover -p=1 -tags=envtest ./...
220218
kubectl delete -k ./config/dev
221219

222-
# Expects operator to be running
223-
.PHONY: check-kuttl
224-
check-kuttl: ## Run kuttl end-to-end tests
225-
check-kuttl: ## example command: make check-kuttl KUTTL_TEST='
226-
${KUTTL_TEST} \
227-
--config testing/kuttl/kuttl-test.yaml
228-
229-
.PHONY: generate-kuttl
230-
generate-kuttl: export KUTTL_PG_UPGRADE_FROM_VERSION ?= 15
231-
generate-kuttl: export KUTTL_PG_UPGRADE_TO_VERSION ?= 16
232-
generate-kuttl: export KUTTL_PG_VERSION ?= 16
233-
generate-kuttl: export KUTTL_POSTGIS_VERSION ?= 3.4
234-
generate-kuttl: export KUTTL_PSQL_IMAGE ?= registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-16.3-1
235-
generate-kuttl: export KUTTL_TEST_DELETE_NAMESPACE ?= kuttl-test-delete-namespace
236-
generate-kuttl: ## Generate kuttl tests
237-
[ ! -d testing/kuttl/e2e-generated ] || rm -r testing/kuttl/e2e-generated
238-
[ ! -d testing/kuttl/e2e-generated-other ] || rm -r testing/kuttl/e2e-generated-other
239-
bash -ceu ' \
240-
case $(KUTTL_PG_VERSION) in \
241-
16 ) export KUTTL_BITNAMI_IMAGE_TAG=16.0.0-debian-11-r3 ;; \
242-
15 ) export KUTTL_BITNAMI_IMAGE_TAG=15.0.0-debian-11-r4 ;; \
243-
14 ) export KUTTL_BITNAMI_IMAGE_TAG=14.5.0-debian-11-r37 ;; \
244-
13 ) export KUTTL_BITNAMI_IMAGE_TAG=13.8.0-debian-11-r39 ;; \
245-
12 ) export KUTTL_BITNAMI_IMAGE_TAG=12.12.0-debian-11-r40 ;; \
246-
esac; \
247-
render() { envsubst '"'"' \
248-
$$KUTTL_PG_UPGRADE_FROM_VERSION $$KUTTL_PG_UPGRADE_TO_VERSION \
249-
$$KUTTL_PG_VERSION $$KUTTL_POSTGIS_VERSION $$KUTTL_PSQL_IMAGE \
250-
$$KUTTL_BITNAMI_IMAGE_TAG $$KUTTL_TEST_DELETE_NAMESPACE'"'"'; }; \
251-
while [ $$# -gt 0 ]; do \
252-
source="$${1}" target="$${1/e2e/e2e-generated}"; \
253-
mkdir -p "$${target%/*}"; render < "$${source}" > "$${target}"; \
254-
shift; \
255-
done' - testing/kuttl/e2e/*/*.yaml testing/kuttl/e2e-other/*/*.yaml testing/kuttl/e2e/*/*/*.yaml testing/kuttl/e2e-other/*/*/*.yaml
256-
257220
##@ Generate
258221

259222
.PHONY: check-generate
@@ -279,7 +242,7 @@ generate: generate-cw
279242
generate-crunchy-crd: ## Generate crd
280243
GOBIN='$(CURDIR)/hack/tools' ./hack/controller-generator.sh \
281244
crd:crdVersions='v1' \
282-
paths='./pkg/apis/postgres-operator.crunchydata.com/...' \
245+
paths='./pkg/apis/upstream.pgv2.percona.com/...' \
283246
output:dir='build/crd/crunchy/generated' # build/crd/generated/{group}_{plural}.yaml
284247
@
285248
GOBIN='$(CURDIR)/hack/tools' ./hack/controller-generator.sh \
@@ -297,10 +260,10 @@ generate-crunchy-crd: ## Generate crd
297260
paths='./pkg/apis/...' \
298261
output:dir='build/crd/crunchybridgeclusters/generated' # build/crd/{plural}/generated/{group}_{plural}.yaml
299262
@
300-
$(KUSTOMIZE) build ./build/crd/crunchy/ > ./config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml
301-
$(KUSTOMIZE) build ./build/crd/pgupgrades > ./config/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml
302-
$(KUSTOMIZE) build ./build/crd/pgadmins > ./config/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml
303-
$(KUSTOMIZE) build ./build/crd/crunchybridgeclusters > ./config/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml
263+
$(KUSTOMIZE) build ./build/crd/crunchy/ > ./config/crd/bases/upstream.pgv2.percona.com_postgresclusters.yaml
264+
$(KUSTOMIZE) build ./build/crd/pgupgrades > ./config/crd/bases/upstream.pgv2.percona.com_pgupgrades.yaml
265+
$(KUSTOMIZE) build ./build/crd/pgadmins > ./config/crd/bases/upstream.pgv2.percona.com_pgadmins.yaml
266+
$(KUSTOMIZE) build ./build/crd/crunchybridgeclusters > ./config/crd/bases/upstream.pgv2.percona.com_crunchybridgeclusters.yaml
304267

305268
.PHONY: generate-deepcopy
306269
generate-deepcopy: ## Generate deepcopy functions

build/crd/crunchy/generated/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ kind: CustomResourceDefinition
44
metadata:
55
annotations:
66
controller-gen.kubebuilder.io/version: v0.20.0
7-
name: postgresclusters.postgres-operator.crunchydata.com
7+
name: postgresclusters.upstream.pgv2.percona.com
88
spec:
9-
group: postgres-operator.crunchydata.com
9+
group: upstream.pgv2.percona.com
1010
names:
1111
kind: PostgresCluster
1212
listKind: PostgresClusterList

build/crd/crunchy/kustomization.yaml

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

44
resources:
5-
- generated/postgres-operator.crunchydata.com_postgresclusters.yaml
5+
- generated/upstream.pgv2.percona.com_postgresclusters.yaml
66

77
patchesJson6902:
88
- target:
99
group: apiextensions.k8s.io
1010
version: v1
1111
kind: CustomResourceDefinition
12-
name: postgresclusters.postgres-operator.crunchydata.com
12+
name: postgresclusters.upstream.pgv2.percona.com
1313
path: condition.yaml
1414
- target:
1515
group: apiextensions.k8s.io
1616
version: v1
1717
kind: CustomResourceDefinition
18-
name: postgresclusters.postgres-operator.crunchydata.com
18+
name: postgresclusters.upstream.pgv2.percona.com
1919
path: todos.yaml
2020
- target:
2121
group: apiextensions.k8s.io
2222
version: v1
2323
kind: CustomResourceDefinition
24-
name: postgresclusters.postgres-operator.crunchydata.com
24+
name: postgresclusters.upstream.pgv2.percona.com
2525
path: validation.yaml
2626
- target:
2727
group: apiextensions.k8s.io
2828
version: v1
2929
kind: CustomResourceDefinition
30-
name: postgresclusters.postgres-operator.crunchydata.com
30+
name: postgresclusters.upstream.pgv2.percona.com
3131
patch: |-
3232
- op: add
3333
path: "/metadata/labels"

build/crd/crunchybridgeclusters/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33

44
resources:
5-
- generated/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml
5+
- generated/upstream.pgv2.percona.com_crunchybridgeclusters.yaml
66

77
patches:
88
- target:
99
group: apiextensions.k8s.io
1010
version: v1
1111
kind: CustomResourceDefinition
12-
name: crunchybridgeclusters.postgres-operator.crunchydata.com
12+
name: crunchybridgeclusters.upstream.pgv2.percona.com
1313
# The version below should match the version on the PostgresCluster CRD
1414
patch: |-
1515
- op: add

build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,6 @@ spec:
10101010
procMount denotes the type of proc mount to use for the containers.
10111011
The default value is Default which uses the container runtime defaults for
10121012
readonly paths and masked paths.
1013-
This requires the ProcMountType feature flag to be enabled.
10141013
Note that this field cannot be set when spec.os.name is windows.
10151014
type: string
10161015
readOnlyRootFilesystem:
@@ -5121,7 +5120,7 @@ spec:
51215120
A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message.
51225121
The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.
51235122
The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.
5124-
The volume will be mounted read-only (ro) and non-executable files (noexec).
5123+
The volume will be mounted read-only (ro).
51255124
Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33.
51265125
The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.
51275126
properties:
@@ -5295,8 +5294,7 @@ spec:
52955294
description: |-
52965295
portworxVolume represents a portworx volume attached and mounted on kubelets host machine.
52975296
Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type
5298-
are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate
5299-
is on.
5297+
are redirected to the pxd.portworx.com CSI driver.
53005298
properties:
53015299
fsType:
53025300
description: |-
@@ -7249,7 +7247,6 @@ spec:
72497247
procMount denotes the type of proc mount to use for the containers.
72507248
The default value is Default which uses the container runtime defaults for
72517249
readonly paths and masked paths.
7252-
This requires the ProcMountType feature flag to be enabled.
72537250
Note that this field cannot be set when spec.os.name is windows.
72547251
type: string
72557252
readOnlyRootFilesystem:
@@ -13916,7 +13913,6 @@ spec:
1391613913
procMount denotes the type of proc mount to use for the containers.
1391713914
The default value is Default which uses the container runtime defaults for
1391813915
readonly paths and masked paths.
13919-
This requires the ProcMountType feature flag to be enabled.
1392013916
Note that this field cannot be set when spec.os.name is windows.
1392113917
type: string
1392213918
readOnlyRootFilesystem:
@@ -15580,7 +15576,6 @@ spec:
1558015576
procMount denotes the type of proc mount to use for the containers.
1558115577
The default value is Default which uses the container runtime defaults for
1558215578
readonly paths and masked paths.
15583-
This requires the ProcMountType feature flag to be enabled.
1558415579
Note that this field cannot be set when spec.os.name is windows.
1558515580
type: string
1558615581
readOnlyRootFilesystem:
@@ -16876,7 +16871,6 @@ spec:
1687616871
procMount denotes the type of proc mount to use for the containers.
1687716872
The default value is Default which uses the container runtime defaults for
1687816873
readonly paths and masked paths.
16879-
This requires the ProcMountType feature flag to be enabled.
1688016874
Note that this field cannot be set when spec.os.name is windows.
1688116875
type: string
1688216876
readOnlyRootFilesystem:
@@ -18769,7 +18763,7 @@ spec:
1876918763
A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message.
1877018764
The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.
1877118765
The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.
18772-
The volume will be mounted read-only (ro) and non-executable files (noexec).
18766+
The volume will be mounted read-only (ro).
1877318767
Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33.
1877418768
The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.
1877518769
properties:
@@ -18941,8 +18935,7 @@ spec:
1894118935
description: |-
1894218936
portworxVolume represents a portworx volume attached and mounted on kubelets host machine.
1894318937
Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type
18944-
are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate
18945-
is on.
18938+
are redirected to the pxd.portworx.com CSI driver.
1894618939
properties:
1894718940
fsType:
1894818941
description: |-
@@ -20872,7 +20865,6 @@ spec:
2087220865
procMount denotes the type of proc mount to use for the containers.
2087320866
The default value is Default which uses the container runtime defaults for
2087420867
readonly paths and masked paths.
20875-
This requires the ProcMountType feature flag to be enabled.
2087620868
Note that this field cannot be set when spec.os.name is windows.
2087720869
type: string
2087820870
readOnlyRootFilesystem:
@@ -22194,7 +22186,6 @@ spec:
2219422186
procMount denotes the type of proc mount to use for the containers.
2219522187
The default value is Default which uses the container runtime defaults for
2219622188
readonly paths and masked paths.
22197-
This requires the ProcMountType feature flag to be enabled.
2219822189
Note that this field cannot be set when spec.os.name is windows.
2219922190
type: string
2220022191
readOnlyRootFilesystem:
@@ -25706,7 +25697,7 @@ spec:
2570625697
A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message.
2570725698
The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.
2570825699
The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.
25709-
The volume will be mounted read-only (ro) and non-executable files (noexec).
25700+
The volume will be mounted read-only (ro).
2571025701
Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33.
2571125702
The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.
2571225703
properties:
@@ -25878,8 +25869,7 @@ spec:
2587825869
description: |-
2587925870
portworxVolume represents a portworx volume attached and mounted on kubelets host machine.
2588025871
Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type
25881-
are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate
25882-
is on.
25872+
are redirected to the pxd.portworx.com CSI driver.
2588325873
properties:
2588425874
fsType:
2588525875
description: |-
@@ -27813,7 +27803,6 @@ spec:
2781327803
procMount denotes the type of proc mount to use for the containers.
2781427804
The default value is Default which uses the container runtime defaults for
2781527805
readonly paths and masked paths.
27816-
This requires the ProcMountType feature flag to be enabled.
2781727806
Note that this field cannot be set when spec.os.name is windows.
2781827807
type: string
2781927808
readOnlyRootFilesystem:

build/crd/percona/generated/pgv2.percona.com_perconapgupgrades.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2092,7 +2092,6 @@ spec:
20922092
procMount denotes the type of proc mount to use for the containers.
20932093
The default value is Default which uses the container runtime defaults for
20942094
readonly paths and masked paths.
2095-
This requires the ProcMountType feature flag to be enabled.
20962095
Note that this field cannot be set when spec.os.name is windows.
20972096
type: string
20982097
readOnlyRootFilesystem:

build/crd/pgadmins/kustomization.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33

44
resources:
5-
- generated/postgres-operator.crunchydata.com_pgadmins.yaml
5+
- generated/upstream.pgv2.percona.com_pgadmins.yaml
66

77
patches:
88
- target:
99
group: apiextensions.k8s.io
1010
version: v1
1111
kind: CustomResourceDefinition
12-
name: pgadmins.postgres-operator.crunchydata.com
12+
name: pgadmins.upstream.pgv2.percona.com
1313
path: todos.yaml
1414
- target:
1515
group: apiextensions.k8s.io
1616
version: v1
1717
kind: CustomResourceDefinition
18-
name: pgadmins.postgres-operator.crunchydata.com
18+
name: pgadmins.upstream.pgv2.percona.com
1919
# The version below should match the version on the PostgresCluster CRD
2020
patch: |-
2121
- op: add

0 commit comments

Comments
 (0)