RedisLabs / redis-enterprise-k8s-docs

152 stars 92 forks source link

This PR adds additionalPrinterColumns to "kubectl get redb" #163

Open caiobegotti opened 3 years ago

caiobegotti commented 3 years ago

This PR adds additionalPrinterColumns to "kubectl get redb" to show useful spec status, particularly HOST:PORT, CLUSTER and SHARDS. It's specially useful when we have clusters being created by an infra team and the DBs are owned by developers and they'd need a way to quickly know the HOST:PORT to connect to without messing around with YAMLs output of the object.

This is the output generated:

$ kubectl -n redis-kweb get redb
NAME                HOST                                                     PORT    CLUSTER         SHARDS   STATUS   SPEC STATUS   AGE
redis-db-caches     redis-12484.redis-cluster.redis-kweb.svc.cluster.local   12484   redis-cluster   1        active   Valid         6d22h
redis-db-sessions   redis-13649.redis-cluster.redis-kweb.svc.cluster.local   13649   redis-cluster   1        active   Valid         6d23h