Skip to content

Commit

Permalink
Bump controller-tools to v0.9.0
Browse files Browse the repository at this point in the history
This version supports CEL validation rules via Go markers.
  • Loading branch information
cbandy committed Apr 10, 2024
1 parent 1f87ed7 commit 2481a72
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 70 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ endef
CONTROLLER ?= hack/tools/controller-gen
tools: tools/controller-gen
tools/controller-gen:
$(call go-get-tool,$(CONTROLLER),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0)
$(call go-get-tool,$(CONTROLLER),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.0)

ENVTEST ?= hack/tools/setup-envtest
tools: tools/setup-envtest
Expand Down
11 changes: 0 additions & 11 deletions build/crd/crunchybridgeclusters/immutable.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions build/crd/crunchybridgeclusters/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ resources:
- generated/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml

patches:
# Remove the zero status field included by [email protected]. These zero
# values conflict with the CRD controller in Kubernetes before v1.22.
# - https://github.com/kubernetes-sigs/controller-tools/pull/630
# - https://pr.k8s.io/100970
- target:
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: crunchybridgeclusters.postgres-operator.crunchydata.com
patch: |-
- op: remove
path: /status
- target:
group: apiextensions.k8s.io
version: v1
Expand All @@ -29,9 +17,3 @@ patches:
value:
app.kubernetes.io/name: pgo
app.kubernetes.io/version: latest
- target:
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: crunchybridgeclusters.postgres-operator.crunchydata.com
path: immutable.yaml
12 changes: 0 additions & 12 deletions build/crd/pgadmins/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ resources:
- generated/postgres-operator.crunchydata.com_pgadmins.yaml

patches:
# Remove the zero status field included by [email protected]. These zero
# values conflict with the CRD controller in Kubernetes before v1.22.
# - https://github.com/kubernetes-sigs/controller-tools/pull/630
# - https://pr.k8s.io/100970
- target:
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: pgadmins.postgres-operator.crunchydata.com
patch: |-
- op: remove
path: /status
- target:
group: apiextensions.k8s.io
version: v1
Expand Down
12 changes: 0 additions & 12 deletions build/crd/pgupgrades/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ resources:
- generated/postgres-operator.crunchydata.com_pgupgrades.yaml

patches:
# Remove the zero status field included by [email protected]. These zero
# values conflict with the CRD controller in Kubernetes before v1.22.
# - https://github.com/kubernetes-sigs/controller-tools/pull/630
# - https://pr.k8s.io/100970
- target:
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: pgupgrades.postgres-operator.crunchydata.com
patch: |-
- op: remove
path: /status
- target:
group: apiextensions.k8s.io
version: v1
Expand Down
6 changes: 0 additions & 6 deletions build/crd/postgresclusters/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ patchesJson6902:
kind: CustomResourceDefinition
name: postgresclusters.postgres-operator.crunchydata.com
path: condition.yaml
- target:
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: postgresclusters.postgres-operator.crunchydata.com
path: status.yaml
- target:
group: apiextensions.k8s.io
version: v1
Expand Down
6 changes: 0 additions & 6 deletions build/crd/postgresclusters/status.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
labels:
app.kubernetes.io/name: pgo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
labels:
app.kubernetes.io/name: pgo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
labels:
app.kubernetes.io/name: pgo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
labels:
app.kubernetes.io/name: pgo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ type CrunchyBridgeClusterSpec struct {
// Currently Bridge offers aws, azure, and gcp only
// +kubebuilder:validation:Required
// +kubebuilder:validation:Enum={aws,azure,gcp}
// +kubebuilder:validation:XValidation:rule=`self == oldSelf`,message="immutable"
Provider string `json:"provider"`

// The provider region where the cluster is located.
// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule=`self == oldSelf`,message="immutable"
Region string `json:"region"`

// Roles for which to create Secrets that contain their credentials which
Expand Down

0 comments on commit 2481a72

Please sign in to comment.