Skip to content
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

Extend Gslb CRD with additionalPrinterColumns #425

Merged
merged 1 commit into from
Apr 3, 2021

Conversation

ytsarev
Copy link
Member

@ytsarev ytsarev commented Apr 2, 2021

Use https://book.kubebuilder.io/reference/generating-crd.html#additional-printer-columns
to add additionalPrinterColumns exposing strategy and geoTag of Gslb CR

From the user perspective it looks like

kubectl -n test-gslb get gslb
NAME                 STRATEGY     GEOTAG
test-gslb            roundRobin   eu-west-1
test-gslb-failover   failover     eu-west-1

Signed-off-by: Yury Tsarev yury.tsarev@absa.africa

Use https://book.kubebuilder.io/reference/generating-crd.html#additional-printer-columns
to add `additionalPrinterColumns` exposing strategy and geoTag of Gslb CR

From the user perspective it looks like
```sh
kubectl -n test-gslb get gslb
NAME                 STRATEGY     GEOTAG
test-gslb            roundRobin   eu-west-1
test-gslb-failover   failover     eu-west-1
```

Signed-off-by: Yury Tsarev <yury.tsarev@absa.africa>
Copy link
Collaborator

@k0da k0da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While there, can we please have host as well?

@ytsarev
Copy link
Member Author

ytsarev commented Apr 2, 2021

While there, can we please have host as well?

There can be many hosts for the same Gslb also there is a representation type limitation of

 must be one of boolean,date,integer,number,string

So

k -n test-gslb get gslb test-gslb-failover
NAME                 GEOTAG      HEATHYRECORDS                                                            SERVICEHEALTH
test-gslb-failover   eu-west-1   map[failover.test.k8gb.io:[34.254.84.32 52.212.133.90 54.195.241.226]]   map[failover.test.k8gb.io:Healthy]

doesn't look cool

So I don't know how to properly represent the object in the print column.

@ytsarev ytsarev merged commit c105f41 into master Apr 3, 2021
@ytsarev ytsarev deleted the additionalPrinterColumns branch April 3, 2021 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants