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

x.catalog.kubedb.com resources always shown #375

Closed
sh0rez opened this Issue Dec 23, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@sh0rez
Copy link

sh0rez commented Dec 23, 2018

Problem Description: kubedb-catalog creates objects for all supported versions of the individual databases. Those objects are general and not namespace specific, thus they got put into the Cluster scope here, which is fine. But still, when listing all objects of a namespace they are getting shown. IMHO this is undesired, because it produces a lot of information that is not needed when asking for the objects belonging to a namespace, not to the cluster.

Steps to reproduce:

$ kubectl create ns test
$ kubectl get -n test all

which results in all versions getting shown:

NAME                                     VERSION   DB_IMAGE              DEPRECATED   AGE
mysqlversion.catalog.kubedb.com/5        5         kubedb/mysql:5        true         44d
mysqlversion.catalog.kubedb.com/5-v1     5         kubedb/mysql:5-v1                  44d
mysqlversion.catalog.kubedb.com/5.7      5.7       kubedb/mysql:5.7      true         44d
mysqlversion.catalog.kubedb.com/5.7-v1   5.7       kubedb/mysql:5.7-v1                44d
mysqlversion.catalog.kubedb.com/8        8         kubedb/mysql:8        true         44d
mysqlversion.catalog.kubedb.com/8-v1     8         kubedb/mysql:8-v1                  44d
mysqlversion.catalog.kubedb.com/8.0      8.0       kubedb/mysql:8.0      true         44d
mysqlversion.catalog.kubedb.com/8.0-v1   8.0       kubedb/mysql:8.0-v1                44d

NAME                                               VERSION   DB_IMAGE                        DEPRECATED   AGE
elasticsearchversion.catalog.kubedb.com/5.6        5.6       kubedb/elasticsearch:5.6        true         44d
elasticsearchversion.catalog.kubedb.com/5.6-v1     5.6       kubedb/elasticsearch:5.6-v1                  44d
elasticsearchversion.catalog.kubedb.com/5.6.4      5.6.4     kubedb/elasticsearch:5.6.4      true         44d
elasticsearchversion.catalog.kubedb.com/5.6.4-v1   5.6.4     kubedb/elasticsearch:5.6.4-v1                44d
elasticsearchversion.catalog.kubedb.com/6.2        6.2       kubedb/elasticsearch:6.2        true         44d
elasticsearchversion.catalog.kubedb.com/6.2-v1     6.2       kubedb/elasticsearch:6.2-v1                  44d
elasticsearchversion.catalog.kubedb.com/6.2.4      6.2.4     kubedb/elasticsearch:6.2.4      true         44d
elasticsearchversion.catalog.kubedb.com/6.2.4-v1   6.2.4     kubedb/elasticsearch:6.2.4-v1                44d
elasticsearchversion.catalog.kubedb.com/6.3        6.3       kubedb/elasticsearch:6.3        true         44d
elasticsearchversion.catalog.kubedb.com/6.3-v1     6.3       kubedb/elasticsearch:6.3-v1                  44d
elasticsearchversion.catalog.kubedb.com/6.3.0      6.3.0     kubedb/elasticsearch:6.3.0      true         44d
elasticsearchversion.catalog.kubedb.com/6.3.0-v1   6.3.0     kubedb/elasticsearch:6.3.0-v1                44d
elasticsearchversion.catalog.kubedb.com/6.4        6.4       kubedb/elasticsearch:6.4                     44d
elasticsearchversion.catalog.kubedb.com/6.4.0      6.4.0     kubedb/elasticsearch:6.4.0                   44d

NAME                                          VERSION   DB_IMAGE                   DEPRECATED   AGE
postgresversion.catalog.kubedb.com/10.2       10.2      kubedb/postgres:10.2       true         44d
postgresversion.catalog.kubedb.com/10.2-v1    10.2      kubedb/postgres:10.2-v1                 44d
postgresversion.catalog.kubedb.com/9.6        9.6       kubedb/postgres:9.6        true         44d
postgresversion.catalog.kubedb.com/9.6-v1     9.6       kubedb/postgres:9.6-v1                  44d
postgresversion.catalog.kubedb.com/9.6.7      9.6.7     kubedb/postgres:9.6.7      true         44d
postgresversion.catalog.kubedb.com/9.6.7-v1   9.6.7     kubedb/postgres:9.6.7-v1                44d

NAME                                       VERSION   DB_IMAGE                DEPRECATED   AGE
redisversion.catalog.kubedb.com/4          4         kubedb/redis:4          true         44d
redisversion.catalog.kubedb.com/4-v1       4         kubedb/redis:4-v1                    44d
redisversion.catalog.kubedb.com/4.0        4.0       kubedb/redis:4.0        true         44d
redisversion.catalog.kubedb.com/4.0-v1     4.0       kubedb/redis:4.0-v1                  44d
redisversion.catalog.kubedb.com/4.0.6      4.0.6     kubedb/redis:4.0.6      true         44d
redisversion.catalog.kubedb.com/4.0.6-v1   4.0.6     kubedb/redis:4.0.6-v1                44d

NAME                                    VERSION   DB_IMAGE              DEPRECATED   AGE
etcdversion.catalog.kubedb.com/3.2.13   3.2.13    kubedb/etcd:v3.2.13                44d

NAME                                           VERSION   DB_IMAGE                    DEPRECATED   AGE
memcachedversion.catalog.kubedb.com/1.5        1.5       kubedb/memcached:1.5        true         44d
memcachedversion.catalog.kubedb.com/1.5-v1     1.5       kubedb/memcached:1.5-v1                  44d
memcachedversion.catalog.kubedb.com/1.5.4      1.5.4     kubedb/memcached:1.5.4      true         44d
memcachedversion.catalog.kubedb.com/1.5.4-v1   1.5.4     kubedb/memcached:1.5.4-v1                44d

NAME                                       VERSION   DB_IMAGE              DEPRECATED   AGE
mongodbversion.catalog.kubedb.com/3.4      3.4       kubedb/mongo:3.4      true         44d
mongodbversion.catalog.kubedb.com/3.4-v1   3.4       kubedb/mongo:3.4-v1                44d
mongodbversion.catalog.kubedb.com/3.6      3.6       kubedb/mongo:3.6      true         44d
mongodbversion.catalog.kubedb.com/3.6-v1   3.6       kubedb/mongo:3.6-v1                44d

Desired behaviour: The versions don't get shown when querying namespace (!) resources. If one wants to get the supported versions, an explicit query is sufficient (e.g. kubectl get etcdversion.catalog.kubedb.com)

@hossainemruz

This comment has been minimized.

Copy link
Member

hossainemruz commented Dec 24, 2018

@sh0rez thank you for reporting. This happen because we have added this crds to category: all. We might remove this in future update. For, temporary workaround, just edit the crd remove all from category field.

Run:

 kubectl edit crd elasticsearchversions.catalog.kubedb.com

Then remove -all from category.

 names:
  categories:
  - datastore
  - kubedb
  - appscode
  - all <--------- remove it

Do similar for all other crds.

kubectl edit crd mysqlversion.catalog.kubedb.com
kubectl edit crd postgresversion.catalog.kubedb.com
kubectl edit crd redisversion.catalog.kubedb.com
kubectl edit crd etcdversion.catalog.kubedb.com
kubectl edit crd memcachedversion.catalog.kubedb.com
kubectl edit crd mongodbversion.catalog.kubedb.com
@sh0rez

This comment has been minimized.

Copy link

sh0rez commented Dec 25, 2018

@hossainemruz thanks for your quick reply, this fixes it for now. I believe it would be great to include this by default, because of the arguments outlined above.

tamalsaha added a commit to kubedb/apimachinery that referenced this issue Dec 26, 2018

Remove database versions from "all" category (#374)
This PR removes the version objects of the individual databases from the `all` category. IMHO they do not belong there, as they are cluster-wide resources and showing them on an `all` call, which is namespaced (not cluster-wide), produces very verbose messages without any valuable information.

Closes kubedb/project#375
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment