Skip to content

Turn off preserve unknown fields - #2903

Merged
brancz merged 4 commits into
prometheus-operator:masterfrom
pgier:turn-off-preserve-unknown-fields
Dec 10, 2019
Merged

brancz merged 4 commits into
prometheus-operator:masterfrom
pgier:turn-off-preserve-unknown-fields

Conversation

@pgier

@pgier pgier commented Dec 9, 2019

Copy link
Copy Markdown
Contributor

The main goal of this change is to get kubectl explain working for the various Kinds.

pgier added 4 commits December 9, 2019 13:36
This upgrade adds structural information to the generated CRDs for
the IntOrString fields.
The addition of the 'x-kubernetes-int-or-string: true' field to
the CRD causes some additional validation to take place which in
turn requires the godoc comment on the ObjectMeta field to be
removed to prevent validation errors.

See related controller-tools issue for more details:
kubernetes-sigs/controller-tools#373
Setting this field to false, enables structural validation on the CRD.
This enables kubectl explain to work correctly for the CRD kinds.
@brancz

brancz commented Dec 10, 2019

Copy link
Copy Markdown
Contributor

lgtm 👍

@brancz
brancz merged commit 58cb505 into prometheus-operator:master Dec 10, 2019
@s-urbaniak

Copy link
Copy Markdown
Contributor

very cool! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants