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

colors for crds #2121

Closed
sherlant opened this issue Jun 9, 2023 · 11 comments
Closed

colors for crds #2121

sherlant opened this issue Jun 9, 2023 · 11 comments

Comments

@sherlant
Copy link

sherlant commented Jun 9, 2023

Hello,

there is a way for colored crds in k9s like pods ? I don't know if it's hardcoded for pods or depends on a status of resource.

thx

@placintaalexandru
Copy link
Contributor

placintaalexandru commented Jun 10, 2023

Hello @sherlant
Can you elaborate a little bit about this issue? Which color, more precisely, are you referring to?
There are a lot of places where colors are hardcoded and the skin.yaml is not taken into account. I attempt to fix part of that using this PR, but CRDS did not use a hardcoded color as far as I remember.

@sherlant
Copy link
Author

Hello,
yes, of course. I want colors like this on crds :
image

@placintaalexandru
Copy link
Contributor

Ok. I looked through the code and it seems that the CRDs don't have a function that is used to render their colours so the default one is used. When, more precisely, do you want the CRD to be red?

@sherlant
Copy link
Author

yes,
but not all time, based on a status condition for example

@placintaalexandru
Copy link
Contributor

Ok. I'll have a look at it these days

@sherlant
Copy link
Author

thanks a lot

@sherlant
Copy link
Author

Hello,
have you any news ?

@placintaalexandru
Copy link
Contributor

placintaalexandru commented Jun 20, 2023

Hello,

CRD's don't have a specific status, like PODs (pending, running, failed/completed, container status unknown).
It is possible for a subresource of a CRD to have a status field, defined in .status when creating the CRD, however this status field depends on the CRD type and is not something unique.

For example you could have:

  • subresource1 where Kind: CRD1 with .status:
{
    "memory": "658Ki",
    "pods": "31"
}
  • subresource2 where Kind: CRD2 with .status:
{
    "id": "12345",
    "zone": "dev"
}

Both status fields are different

@sherlant
Copy link
Author

Hi,
thx for your reply.
I understand, but there are no way for k9s to have a convention with that ? If a particular field in .status is set, with conventional values, k9s use it to display the good color ?
And all crd's creator is free to use it or no ?

@placintaalexandru
Copy link
Contributor

At the moment there is no such convention.
If you want, you can close this one and make a feature request

@sherlant
Copy link
Author

Ok thanks you, i gonna try to do this asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants