-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
6be5ad8
to
f6b7139
Compare
…, 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" |
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.
Its not age, it is creationTimestamp
. Age is timeNow - creationTimestamp
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.
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.
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.
Strange a bit, but ok
This PR adds additional columns printers for groups:
clusterresources
clusters
kafkamanagement
ref #561