k9s icon indicating copy to clipboard operation
k9s copied to clipboard

CRDs listed in red but don't seem to be deprecated

Open ybizeul opened this issue 1 year ago • 6 comments




Describe the bug Some CRDs appear in red, but not sure what the reason is. They contain some deprecated versions of their schema, which is pretty standard, but their most recent schema is not deprecated and should be displayed as such it seems

To Reproduce In my case, I was deploying a kubernetes cluster with CAPI, most controller resource appear red

Historical Documents This is an example resource that shows in red

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
[...]
  name: machines.cluster.x-k8s.io
spec:
  conversion:
    strategy: Webhook
    webhook:
[...]
      conversionReviewVersions:
      - v1
      - v1beta1
  group: cluster.x-k8s.io
  names:
[...]
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - description: Provider ID
[...]
    deprecated: true
    name: v1alpha3
    schema:
[...]
    served: false
    storage: false
    subresources:
      status: {}
  - additionalPrinterColumns:
[...]
    deprecated: true
    name: v1alpha4
    schema:
...]
    served: false
    storage: false
    subresources:
      status: {}
  - additionalPrinterColumns:
[...]
    name: v1beta1
    schema:
[...]
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    categories:
    - cluster-api
    kind: Machine
    listKind: MachineList
    plural: machines
    shortNames:
    - ma
    singular: machine
  conditions:
  - lastTransitionTime: "2024-08-19T09:58:32Z"
    message: no conflicts found
    reason: NoConflicts
    status: "True"
    type: NamesAccepted
  - lastTransitionTime: "2024-08-19T09:58:32Z"
    message: the initial names have been accepted
    reason: InitialNamesAccepted
    status: "True"
    type: Established
  storedVersions:
  - v1beta1

Expected behavior I think this particular resource should have the standard color (blue)

Screenshots image

Versions (please complete the following information):

  • OSX
  • K9s: 0.32.5
  • K8s: v1.31.0

ybizeul avatar Aug 19 '24 15:08 ybizeul

If a version in crd is “deprecated” or NOT “served” it will be red, you can check the VALID field to see why by ctrl + w.

wjiec avatar Aug 20 '24 01:08 wjiec

Not sure I understand why a version not served AND deprecated would be a problem. Seems like pretty standard CRD lifecycle stuff or am I missing something ?

ybizeul avatar Aug 20 '24 06:08 ybizeul

Uh-huh, I think it's just “reusing” the color “red” by the way, it doesn't mean “error” or anything like that. Just highlighting it? 🤔️

wjiec avatar Aug 20 '24 06:08 wjiec

Same as CrashLoopBackOff and Error containers ? In any case that's certainly something that drains more attention than it should.

ybizeul avatar Aug 20 '24 06:08 ybizeul

Indeed, it might be a bit better to change the color or express it in some other way (e.g. using 🗑 or ⚠️ or something like that)

wjiec avatar Aug 20 '24 08:08 wjiec

I'm experiencing the same issue. I wonder if perhaps this might share cause with https://github.com/derailed/k9s/issues/2842, ie. wrong (old) CRD API version being picked out of multiple ones present in the definition.

kukacz avatar Sep 24 '24 07:09 kukacz

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar May 20 '25 02:05 github-actions[bot]