Skip to content
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

Fix generate HRQ CRD from markers #300

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Jun 16, 2023

While working on #285, I noticed that running make manifests updates the HRQ CRD. This also happens on the master branch, which I think is not intentional and wrong. This PR fixes this by regenerating the HRQ CRD.

The PR also marks the current HRQ as the storage version - which I discovered as missing when comparing the kubebuilder markers for the CRDs.

I think the difference is caused by a minor bug in controller-gen, and is related to the recently added print columns on HRQ. The columns include fields from the HRQ status, and I think there is some code in controller-gen assuming the CRD has a status subresource when including fields from status as print columns.

I really think we should have status as subresources - especially on HRQ, but I don't have the bandwidth to fix that.

/cc @adrianludwin

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 16, 2023
@mochizuki875
Copy link
Member

mochizuki875 commented Jun 19, 2023

@erikgb

I think the difference is caused by a minor bug in controller-gen, and is related to the recently added print columns on HRQ.

Thank you for your fix. It may have been caused by my fix #295 ...

I really think we should have status as subresources - especially on HRQ, but I don't have the bandwidth to fix that.

As you may know that, if we make status subresource, we can independently update status field using StatusClient which is member of client.Client.
(ex. we can update only status field using r.Status().Update().)

Although this use case dosn't seems to exist in HNC, it is generally recommended to make status subresource.
So it might be good to do it.
If needed, I can fix it for you.

@erikgb
Copy link
Contributor Author

erikgb commented Jun 19, 2023

@mochizuki875 We use the status subresource in all other controllers I am involved in, so HNC is quite special in this sense. I have earlier looked at doing this in HNC, and I think it is not a simple task..... But good luck if you make an attempt! 👍

@mochizuki875
Copy link
Member

@erikgb
That's for sure.
Although I don't think it's so important task at this point, I'll check the implementation and if it looks doable, I'll do it:)

@rjbez17
Copy link
Contributor

rjbez17 commented Oct 26, 2023

/lgtm

@adrianludwin ?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 26, 2023
@rjbez17
Copy link
Contributor

rjbez17 commented Oct 27, 2023

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: erikgb, rjbez17

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 Oct 27, 2023
@k8s-ci-robot k8s-ci-robot merged commit d9887e2 into kubernetes-sigs:master Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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 "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants