operator
operator copied to clipboard
Subscription: shortName can have potential conflicts
Describe the bug
Having a generic shortname for Subscription CRD like sub
is prone to ambiguity which isn't handled very well by kubectl or other clients. We came across a potential conflict in openshift (as described in https://issues.redhat.com/browse/OCPBUGS-22092). While using FQNs is the perfect solution, nothing will stop users from using alias/shortNames leading to a potential problem (due to the client limitations) or even breaking of scripts.
Expected behavior CRDs have a shortname that's as unique as possible to the product. Otherwise, remove them to avoid potential conflicts.
To Reproduce
Install/update two CRDs with same shortName
in different order and use the shortName with the clients kubectl get sub
.
Knative release version All
Additional context Originally noticed on openshift https://github.com/openshift-knative/serverless-operator/pull/2341 and turns out addressing the bug here at the source will be more effective. I can get a similar PR if the owners agree otherwise please close with a reason.
Read more here: https://github.com/kubernetes/kubernetes/issues/94860 , https://github.com/kubernetes/kubernetes/issues/108573 and dozen more