Skip to content

Commit 5b40c19

Browse files
authored
Merge pull request #390 from CecileRobertMichon/preserve-unknown-fields-false
🏃 [0.3] Add preserveUnknownFields=false marker
2 parents 2c5b485 + d1dbe62 commit 5b40c19

File tree

6 files changed

+203
-5
lines changed

6 files changed

+203
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ generate-go: $(CONTROLLER_GEN) $(MOCKGEN) $(CONVERSION_GEN) ## Runs Go related g
172172
generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc.
173173
$(CONTROLLER_GEN) \
174174
paths=./api/... \
175-
crd:trivialVersions=true \
175+
crd:trivialVersions=true,preserveUnknownFields=false \
176176
output:crd:dir=$(CRD_ROOT) \
177177
output:webhook:dir=$(WEBHOOK_ROOT) \
178178
webhook

config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
apiVersion: apiextensions.k8s.io/v1beta1
44
kind: CustomResourceDefinition
55
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.2.5
68
creationTimestamp: null
79
name: azureclusters.infrastructure.cluster.x-k8s.io
810
spec:
@@ -14,6 +16,7 @@ spec:
1416
listKind: AzureClusterList
1517
plural: azureclusters
1618
singular: azurecluster
19+
preserveUnknownFields: false
1720
scope: Namespaced
1821
subresources:
1922
status: {}

config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
apiVersion: apiextensions.k8s.io/v1beta1
44
kind: CustomResourceDefinition
55
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.2.5
68
creationTimestamp: null
79
name: azuremachines.infrastructure.cluster.x-k8s.io
810
spec:
@@ -14,6 +16,7 @@ spec:
1416
listKind: AzureMachineList
1517
plural: azuremachines
1618
singular: azuremachine
19+
preserveUnknownFields: false
1720
scope: Namespaced
1821
subresources:
1922
status: {}

config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
apiVersion: apiextensions.k8s.io/v1beta1
44
kind: CustomResourceDefinition
55
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.2.5
68
creationTimestamp: null
79
name: azuremachinetemplates.infrastructure.cluster.x-k8s.io
810
spec:
@@ -14,6 +16,7 @@ spec:
1416
listKind: AzureMachineTemplateList
1517
plural: azuremachinetemplates
1618
singular: azuremachinetemplate
19+
preserveUnknownFields: false
1720
scope: Namespaced
1821
validation:
1922
openAPIV3Schema:

hack/tools/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ go 1.12
55
require (
66
github.com/golang/mock v1.3.1
77
github.com/golangci/golangci-lint v1.19.1
8-
k8s.io/code-generator v0.0.0-20190923155300-6206bfaf5c98
8+
k8s.io/code-generator v0.17.0
99
sigs.k8s.io/cluster-api/hack/tools v0.0.0-20191002152509-a6b5ba419bad
10-
sigs.k8s.io/controller-tools v0.2.1
10+
sigs.k8s.io/controller-tools v0.2.5
1111
sigs.k8s.io/testing_frameworks v0.1.1
1212
)
1313

0 commit comments

Comments
 (0)