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 group issue and add age column to DockerMachinePools #5206

Merged
merged 7 commits into from
Sep 15, 2021

Conversation

Jont828
Copy link
Contributor

@Jont828 Jont828 commented Sep 3, 2021

What this PR does / why we need it: Follow up to #5180. There was an issue with DockerMachinePools having the wrong CRD name generated (exp.infrastructure.cluster.x-k8s.io_dockermachinepools.yaml instead of infrastructure.cluster.x-k8s.io_dockermachinepools.yaml), and so the age column was not added in #5180. This corrects the issue and adds the age column as well.

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 #5159

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 3, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @Jont828. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 3, 2021
@Jont828 Jont828 changed the title Fix group issue and add age column to DockerMachinePools 🐛 Fix group issue and add age column to DockerMachinePools Sep 3, 2021
Copy link
Contributor

@jackfrancis jackfrancis left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 6, 2021
@Jont828 Jont828 changed the title 🐛 Fix group issue and add age column to DockerMachinePools ⚠️ Fix group issue and add age column to DockerMachinePools Sep 7, 2021
@@ -195,7 +195,12 @@ spec:
storage: false
subresources:
status: {}
- name: v1alpha4
- additionalPrinterColumns:
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAIK if there are no additionalPrinterColumns the CRD gets an age column automatically, is the idea here that we add the age column everywhere in case we add others printer columns later?

Copy link
Member

@sbueringer sbueringer Sep 8, 2021

Choose a reason for hiding this comment

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

Yes, there is no way to do it automatically (it's only added per default if no additionalPrinterColumns are configured).
Some additional context: #5180 (comment) (especially apiextensions/helpers.go).

So yes, the idea is to add it everywhere now, so we don't forget to add it later.

@Jont828
Copy link
Contributor Author

Jont828 commented Sep 8, 2021

I've changed the template in DockerMachinePool in both v1alpha3 and v1alpha4 from DockerMachineTemplate to DockerMachinePoolTemplate. I initially only changed it in v1alpha4, but I was running into an issue where the generated conversion functions were not working since the types were different between versions. Any thoughts on this?

@sbueringer
Copy link
Member

@Jont828 I think we should probably call it DockerMachinePoolMachineTemplate instead of DockerMachinePoolTemplate. DockerMachinePoolTemplate can be misleading as it suggests that it's a template of a DockerMachinePool.

I'm not 100% sure about the conversion. In general, it should be possible to convert the type (we have a few examples in other packages). But not sure if we still have the problem in the CRD if we keep the struct in v1alpha3 the same. Given that CAPD is mainly used for development purposes it could be fine to even change the old struct.

@Jont828
Copy link
Contributor Author

Jont828 commented Sep 8, 2021

@sbueringer That makes sense, I guess it's just an awkward case of the desired name being taken. As for the conversion, I discussed w/ Cecile and she mentioned that in changing AzureMachineTemplate, she had to update the name in both v1alpha3 and v1alpha4. I think changing the v1alpha3 struct is probably fine since the json name is still the same and I don't believe the type gets directly accessed (unless I'm mistaken).

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 8, 2021
@sbueringer
Copy link
Member

/lgtm
/retest
I think you can squash

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 9, 2021
@vincepri
Copy link
Member

@Jont828 Please squash commits

@vincepri vincepri added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Sep 15, 2021
@vincepri
Copy link
Member

/approve

Let's let the bot merge squash and merge

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 Sep 15, 2021
@k8s-ci-robot k8s-ci-robot merged commit bae2680 into kubernetes-sigs:master Sep 15, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.4 milestone Sep 15, 2021
sbueringer pushed a commit to sbueringer/cluster-api that referenced this pull request Sep 20, 2021
…es-sigs#5206)

* Fix group issue and add age column to DockerMachinePools

* Rename 'DockerMachineTemplate' to 'DockerMachinePoolTemplate'

* Regenerate CRD for DockerMachinePool

* Regenerate DockerMachinePool for v1alpha3 with new template type

* Fix comment

* Rename 'DockerMachinePoolTemplate' to 'DockerMachinePoolMachineTemplate'

* Regenerate for 'DockerMachinePoolMachineTemplate'
sbueringer pushed a commit to sbueringer/cluster-api that referenced this pull request Sep 21, 2021
…es-sigs#5206)

* Fix group issue and add age column to DockerMachinePools

* Rename 'DockerMachineTemplate' to 'DockerMachinePoolTemplate'

* Regenerate CRD for DockerMachinePool

* Regenerate DockerMachinePool for v1alpha3 with new template type

* Fix comment

* Rename 'DockerMachinePoolTemplate' to 'DockerMachinePoolMachineTemplate'

* Regenerate for 'DockerMachinePoolMachineTemplate'
Jont828 added a commit to Jont828/cluster-api that referenced this pull request Oct 26, 2021
…es-sigs#5206)

* Fix group issue and add age column to DockerMachinePools

* Rename 'DockerMachineTemplate' to 'DockerMachinePoolTemplate'

* Regenerate CRD for DockerMachinePool

* Regenerate DockerMachinePool for v1alpha3 with new template type

* Fix comment

* Rename 'DockerMachinePoolTemplate' to 'DockerMachinePoolMachineTemplate'

* Regenerate for 'DockerMachinePoolMachineTemplate'
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add AGE column to all our CRDs
8 participants