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

Issue-561, Additional columns printers #645

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Issue-561, Additional columns printers #645

merged 1 commit into from
Dec 12, 2023

Conversation

worryg0d
Copy link
Collaborator

@worryg0d worryg0d commented Dec 11, 2023

This PR adds additional columns printers for groups:

  • clusterresources
  • clusters
  • kafkamanagement

ref #561

@worryg0d worryg0d added the enhancement New feature or request label Dec 11, 2023
@worryg0d worryg0d self-assigned this Dec 11, 2023
@worryg0d worryg0d force-pushed the issue-561 branch 2 times, most recently from 6be5ad8 to f6b7139 Compare December 11, 2023 12:56
…, clusterresources and kafkamanagement groups
@@ -39,6 +39,10 @@ type AWSEncryptionKeyStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
Copy link
Contributor

Choose a reason for hiding this comment

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

Its not age, it is creationTimestamp. Age is timeNow - creationTimestamp

Copy link
Collaborator Author

@worryg0d worryg0d Dec 11, 2023

Choose a reason for hiding this comment

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

You're right, but there is no way to do arithmetical operations for printing columns. But the way to show the age of a resource is to use .metadata.creationTimestamp and type date. You may see an example here. Kubectl does the same thing for all CRDs if there are no additional column printers.

Copy link
Contributor

Choose a reason for hiding this comment

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

Strange a bit, but ok

@testisnullus testisnullus merged commit 5138361 into main Dec 12, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants