Skip to content

Commit 336d802

Browse files
committed
Remove crd patch hack
- new controller-gen now adds default values to ports the hack is no longer needed
1 parent 60f24b8 commit 336d802

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

Makefile

-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ manifests: install-tools ## Generate manifests e.g. CRD, RBAC etc.
2121
controller-gen $(CRD_OPTIONS) rbac:roleName=operator-role paths="./api/...;./controllers/..." output:crd:artifacts:config=config/crd/bases
2222
./hack/remove-override-descriptions.sh
2323
./hack/add-notice-to-yaml.sh config/rbac/role.yaml
24-
# this is temporary workaround due to issue https://github.com/kubernetes/kubernetes/issues/91395
25-
# the hack ensures that "protocal" is a required value where this field is listed as x-kubernetes-list-map-keys
26-
# without the hack, our crd doesn't install on k8s 1.18 because of the issue above
27-
./hack/patch-crd.sh
2824
./hack/add-notice-to-yaml.sh config/crd/bases/rabbitmq.com_rabbitmqclusters.yaml
2925

3026
# Run go fmt against code

config/crd/bases/rabbitmq.com_rabbitmqclusters.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ apiVersion: apiextensions.k8s.io/v1
1010
kind: CustomResourceDefinition
1111
metadata:
1212
annotations:
13-
controller-gen.kubebuilder.io/version: v0.4.0
13+
controller-gen.kubebuilder.io/version: v0.4.1
1414
creationTimestamp: null
1515
name: rabbitmqclusters.rabbitmq.com
1616
spec:
@@ -713,6 +713,7 @@ spec:
713713
format: int32
714714
type: integer
715715
protocol:
716+
default: TCP
716717
type: string
717718
targetPort:
718719
anyOf:
@@ -1364,6 +1365,7 @@ spec:
13641365
name:
13651366
type: string
13661367
protocol:
1368+
default: TCP
13671369
type: string
13681370
required:
13691371
- containerPort
@@ -1925,6 +1927,7 @@ spec:
19251927
name:
19261928
type: string
19271929
protocol:
1930+
default: TCP
19281931
type: string
19291932
required:
19301933
- containerPort
@@ -2485,6 +2488,7 @@ spec:
24852488
name:
24862489
type: string
24872490
protocol:
2491+
default: TCP
24882492
type: string
24892493
required:
24902494
- containerPort

hack/crd-patch.json

-5
This file was deleted.

hack/patch-crd.sh

-4
This file was deleted.

0 commit comments

Comments
 (0)