olm status command output should sort by either name, namespace, kind
Bug Report
What did you do?
Installed OLM v0.24.0 via:
operator-sdk olm install
Invoked then such command:
operator-sdk olm status
Observing such output where none of NAME, NAMESPACE, KIND columns is sorted:
$ operator-sdk olm status
INFO[0000] Fetching CRDs for version "v0.24.0"
INFO[0000] Fetching resources for resolved version "v0.24.0"
INFO[0001] Successfully got OLM status for version "v0.24.0"
NAME NAMESPACE KIND STATUS
olm-operators olm OperatorGroup Installed
operators.operators.coreos.com CustomResourceDefinition Installed
operatorconditions.operators.coreos.com CustomResourceDefinition Installed
catalog-operator olm Deployment Installed
olm-operator-binding-olm ClusterRoleBinding Installed
operatorhubio-catalog olm CatalogSource Installed
subscriptions.operators.coreos.com CustomResourceDefinition Installed
system:controller:operator-lifecycle-manager ClusterRole Installed
installplans.operators.coreos.com CustomResourceDefinition Installed
operatorgroups.operators.coreos.com CustomResourceDefinition Installed
olm Namespace Installed
cluster OLMConfig Installed
packageserver olm ClusterServiceVersion Installed
operators Namespace Installed
catalogsources.operators.coreos.com CustomResourceDefinition Installed
olm-operator olm Deployment Installed
global-operators operators OperatorGroup Installed
aggregate-olm-view ClusterRole Installed
aggregate-olm-edit ClusterRole Installed
olmconfigs.operators.coreos.com CustomResourceDefinition Installed
clusterserviceversions.operators.coreos.com CustomResourceDefinition Installed
olm-operator-serviceaccount olm ServiceAccount Installed
What did you expect to see? I would expect potentially either some additional sorting flag/option to be supplied to 'olm status' command or output be sorted by default by KIND at least as such would be of value to see fast what different CRDs/other types of resources were added by OLM installation.
What did you see instead? Under which circumstances? I'm seeing above unsorted output
Environment
- operator-lifecycle-manager version: v0.24.0
- Kubernetes version information: v1.26.1
- Kubernetes cluster kind: minikube
Possible Solution
Unknown, requires some post-processing at the moment of observed output.
Additional context having operator-sdk v1.28.0 - currently such are 'olm status' command's capabilities:
$ operator-sdk olm status --help
Get the status of the Operator Lifecycle Manager installation in your cluster
Usage:
operator-sdk olm status [flags]
Flags:
-h, --help help for status
--olm-namespace string namespace where OLM is installed (default "olm")
--timeout duration time to wait for the command to complete before failing (default 2m0s)
--version string version of OLM installed on cluster; if unsetoperator-sdk attempts to auto-discover the version
Global Flags:
--plugins strings plugin keys to be used for this subcommand execution
--verbose Enable verbose logging
Not sure this qualifies as a bug, but definitely a valid point.
ok, wasn't sure what was original intent of status output layout, but could be as feature, agreed