-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(:warning:, major), Adding an option flag for fixing up object meta-data #494
Conversation
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Welcome @champak! |
@DirectXMan12 just doing a poll; is this what you were describing as needed on #395 ? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close to it -- comments inline
@@ -83,6 +83,9 @@ type Generator struct { | |||
// You'll need to use "v1" to get support for features like defaulting, | |||
// along with an API server that supports it (Kubernetes 1.16+). | |||
CRDVersions []string `marker:"crdVersions,optional"` | |||
|
|||
// preserve object meta data | |||
PreserveObjectMeta *bool `marker:",optional"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this flag seems to do the inverse of what i'd expect, if I'm reading this right
Here's what I'd expect:
if you pass PreserveObjectMeta, you get an object with no top-level metadata (it's enforced by the apiserver), but all the embedded object metadata fields are filled out.
If you don't pass PreserveObjectMeta, you get the behavior today, which is that all objectmeta fields are wiped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DirectXMan12 thanks for taking a look ! I probably misunderstood but it had seemed when PreserveObjectMeta is either unspecified or set to false, with this update we would not invoke the new fnc FixupMetaData() and hence the behavior would be what we have today. I shall re-read and flip the check if that is what you meant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DirectXMan12 I think the top leve metadata will be rejected by the API server regardless, I thought this PR was about keeping the metadata for embedded ObjectMeta
in the CRDs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @champak
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: champak The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I'm testing this PR, and I see
I think this one @DirectXMan12 explicitly mentions not to generate Also, it seems like
this error seems valid, I cannot find any reference in the openAPI documentation for this edit: Changing the fieldsV1 field type to tested on |
@champak: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Added an option for preserving embedded object meta-data ( discussed at #448).