-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Add cluster name on printer column on non core types #5334
🌱 Add cluster name on printer column on non core types #5334
Conversation
Welcome @BudhirajaMadhav! |
Hi @BudhirajaMadhav. 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 Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test |
/cc @sbueringer |
Hey @fabriziopandini in the failed test of pull-cluster-api-verify-main it says |
Yep that's correct, once you've run make generate there should be some differences to check in for the generated CRD manifests, these will need to be committed to fix the errors |
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.
Can you please make the suggested changes, then run make generate
and make -C test/infrastructure/docker generate-manifests
(the test failed because the second one was missing) and then squash it all into one commit? Thank you :)
And sorry there was a bit of context missing in the corresponding issue.
P.S. It would be great to get this PR into the 1.0 release (aka ASAP merged :))
@@ -127,6 +127,7 @@ type KubeadmConfigStatus struct { | |||
// +kubebuilder:resource:path=kubeadmconfigs,scope=Namespaced,categories=cluster-api | |||
// +kubebuilder:storageversion | |||
// +kubebuilder:subresource:status | |||
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
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.
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" | |
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
@@ -33,6 +33,7 @@ type KubeadmConfigTemplateResource struct { | |||
// +kubebuilder:object:root=true | |||
// +kubebuilder:resource:path=kubeadmconfigtemplates,scope=Namespaced,categories=cluster-api | |||
// +kubebuilder:storageversion | |||
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
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.
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
We don't set a cluster-name label on this resource
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.
Agreed, also with ClusterClasses, templates are going to be shared across many clusters.
@@ -201,6 +201,7 @@ type KubeadmControlPlaneStatus struct { | |||
// +kubebuilder:storageversion | |||
// +kubebuilder:subresource:status | |||
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector | |||
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
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.
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" | |
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
@@ -28,6 +28,7 @@ type KubeadmControlPlaneTemplateSpec struct { | |||
// +kubebuilder:object:root=true | |||
// +kubebuilder:resource:path=kubeadmcontrolplanetemplates,scope=Namespaced,categories=cluster-api | |||
// +kubebuilder:storageversion | |||
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
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.
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
We don't set a cluster-name label on this resource
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.
Agreed, this is a template introduced for ClusterClasses, so it is shared across many clusters.
@@ -97,6 +97,7 @@ type APIEndpoint struct { | |||
// +kubebuilder:subresource:status | |||
// +kubebuilder:storageversion | |||
// +kubebuilder:object:root=true | |||
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
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.
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" | |
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
@@ -27,6 +27,7 @@ type DockerClusterTemplateSpec struct { | |||
|
|||
// +kubebuilder:object:root=true | |||
// +kubebuilder:storageversion | |||
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
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.
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
We don't set a cluster-name label on this resource
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.
Agreed, this is a template introduced for ClusterClasses, so it is shared across many clusters.
@@ -94,6 +94,7 @@ type DockerMachineStatus struct { | |||
// +kubebuilder:object:root=true | |||
// +kubebuilder:storageversion | |||
// +kubebuilder:subresource:status | |||
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
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.
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" | |
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
@@ -28,6 +28,7 @@ type DockerMachineTemplateSpec struct { | |||
// +kubebuilder:object:root=true | |||
// +kubebuilder:resource:path=dockermachinetemplates,scope=Namespaced,categories=cluster-api | |||
// +kubebuilder:storageversion | |||
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
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.
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
We don't set a cluster-name label on this resource
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.
Agreed, also with ClusterClasses, templates are going to be shared across many clusters.
@@ -114,6 +114,7 @@ type DockerMachinePoolInstanceStatus struct { | |||
// +kubebuilder:storageversion | |||
// +kubebuilder:object:root=true | |||
// +kubebuilder:subresource:status | |||
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
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.
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['machine\\.cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" |
We don't set a cluster-name label on this resource
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.
Fine to remove the column for now but I consider this a bug, let's open an issue
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.
Agree
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.
Done > #5340
@BudhirajaMadhav if you can address comments we will try to get this into v1beta1 RC later today |
Yup @fabriziopandini I will do the required changes today itself. Out now, but will do it asap. |
Hey, @sbueringer if you're there I was about to commit the changes after doing the suggested changes and performing |
@BudhirajaMadhav No problem. Looks like there's something wrong with deepcopy/conversion generation. I'm not sure what, but can you try reset and run Sorry I meant |
Oho, no worries. I did make generate-manifests but I asked on slack and the thing was my go version was 1.17 and after performing |
920e61b
to
3d6d314
Compare
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.
/approve
/lgtm
[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 |
@BudhirajaMadhav Thx :) |
This PR will add clusterName as printer column on non core types
Fixes #5208