-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: custom resource links #2562
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
base: master
Are you sure you want to change the base?
feat: custom resource links #2562
Conversation
30dd834
to
a50f25c
Compare
a50f25c
to
1c96f9d
Compare
97b83e5
to
0ed934d
Compare
3afc8a9
to
f261a29
Compare
f261a29
to
df9e84e
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.
@thejoeejoee First off Thank you Josef for this pr.
I think this would be super useful!
It think it would be best to use the same strategy as the custom column field in kubectl. Thus I don't think it is necessary to differentiate label/field selectors since we end up with a json query anyway.
I am not super keen in overriding 'enter' as I think the default behavior might still be desirable and avoiding surprises while cruising a cluster. Not to mention there could be other fields a user might want to use to surface extended behavior ie list secrets and confimaps referenced by a given crd.
Thus I was thinking perhaps something like this could fit the bill ie pairing a key binding with the json Q to enable different actions from a given resource??
k9s:
customActions:
blee/v1/zorg:
- target: v1/secrets
description: View Secret
action: U:metadata.labels.secret # => bind key U to show associated secret.
- target: v1/configmaps
description: View ConfigMap
action: M:.spec.cm # => bind M to view associated cm
I also think introducing json parsing in this PR should allow us to reuse the parser logic to enable custom columns extensions.
WDT? and would this make sense?
Hi @derailed I'm facing basically the same problem this PR proposing to solve. And here's my two cents.
LabelSelector is a common case when selecting. @thejoeejoee's original proposal didn't quite cover this case. I propose something like:
|
Hello!
As described in #2561, I'm proposing a solution for custom resource links.
I've got some questions during implementation:
internal.KeyFields
from context is not taken into account in allLister
implementations -- that's intentional? I've added support toTable
, makes sense to have implemented in allLister
implementations?customResourceLinks
as it's not only for custom resources, but also for built-in resources, and it's not only for relations, but also for filtering. I'm open to suggestions.