Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

🐛set preserveUnknownFields to false to make updating to crd v1 easier #293

Merged

Conversation

nader-ziada
Copy link
Contributor

What this PR does / why we need it:

  • set preserveUnknownFields to false to make updating to crd v1 easier
  • also update controller tools to v0.2.5

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #290

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 18, 2020
Copy link
Contributor

@vincepri vincepri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, great work!

/assign @chuckha
/approve

@vincepri vincepri added this to the v0.1.x milestone Feb 18, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nader-ziada, vincepri

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 18, 2020
@nader-ziada nader-ziada force-pushed the preserveUnknownFields branch from cd41977 to db45f21 Compare February 18, 2020 18:14
Makefile Outdated
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \
paths=./api/... \
crd:preserveUnknownFields=false \
output:crd:dir=./config/crd/bases
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this should be missing lines 122 and 123 here, since it looks like the intent is to only generate the deepcopy code here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed them

Makefile Outdated
rbac:roleName=manager-role \
webhook \
paths="./..." \
crd:preserveUnknownFields=false \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be changed up top where CRD_OPTIONS is defined, also unsetting the trivialversions flag that is currently set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the preserveUnknownFields option to CRD_OPTIONS

@nader-ziada nader-ziada force-pushed the preserveUnknownFields branch from db45f21 to b70ca10 Compare February 18, 2020 19:19
@nader-ziada
Copy link
Contributor Author

@detiber addressed comments, ready for another look

@detiber
Copy link
Contributor

detiber commented Feb 18, 2020

@nader-ziada did your changes get pushed? I'm not seeing the updates

@nader-ziada nader-ziada force-pushed the preserveUnknownFields branch from b70ca10 to 91f096b Compare February 18, 2020 19:56
@nader-ziada
Copy link
Contributor Author

@detiber sorry, my bad, pushed now

@detiber
Copy link
Contributor

detiber commented Feb 18, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 18, 2020
@k8s-ci-robot k8s-ci-robot merged commit 38af74d into kubernetes-retired:master Feb 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

preserveUnknownFields is set to true on CRDs
5 participants