Skip to content

Commit

Permalink
Enable pruning of unknown fields for CRDs
Browse files Browse the repository at this point in the history
  • Loading branch information
skmatti committed May 6, 2020
1 parent 4f4e36c commit 42c49f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/crd/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
utilpointer "k8s.io/utils/pointer"
)

const (
Expand Down Expand Up @@ -110,6 +111,7 @@ func crd(meta *CRDMeta) *apiextensionsv1beta1.CustomResourceDefinition {
Singular: meta.singular,
ShortNames: meta.shortNames,
},
PreserveUnknownFields: utilpointer.BoolPtr(false),
},
}
if meta.typeSource != "" && meta.fn != nil {
Expand Down

0 comments on commit 42c49f3

Please sign in to comment.