ahmetb/kubectl-tree

Command reports ambiguous kind that's not ambiguous

Closed this issue · 4 comments

$ k tree kubegres my-db
Error: ambiguous kind "kubegres". use one of these as the KIND disambiguate: [kubegres.v1.kubegres.reactive-tech.io, kubegres.v1.kubegres.reactive-tech.io]

The two kinds listed are exactly the same.

This behaviour might be caused by the CRD using the same name for singular and plural:

$ k get crd kubegres.kubegres.reactive-tech.io -o jsonpath={.spec.names}|jq .
{
  "kind": "Kubegres",
  "listKind": "KubegresList",
  "plural": "kubegres",
  "singular": "kubegres"
}

Confirmed that #65 fixes this:

$ ./kubectl-tree kubegres.v1.kubegres.reactive-tech.io my-db
NAMESPACE  NAME                                            READY  REASON        AGE 
foo        Kubegres/my-db                                  -                    378d
foo        ├─CronJob/backup-my-db                          -                    304d
foo        │ ├─Job/backup-my-db-28291118                   -                    2d1h
[...]

Sounds like the kubegres project probably got something wrong here as well? :)

Sounds like the kubegres project probably got something wrong here as well? :)

Absolutely, yes.