agones icon indicating copy to clipboard operation
agones copied to clipboard

Display the player count in a column.

Open Davidnovarro opened this issue 4 years ago • 5 comments

It's a bit tedious right now to get info about tracked players on the game servers, usually find myself calling "kubernetes describe gs" on each allocated instance just to see how many players are on them.

A nice solution would be to display the player count in a separate column when calling "kubernetes get gs" like this https://i.imgur.com/0LwdIqT.png

Davidnovarro avatar Dec 16 '21 06:12 Davidnovarro

/cc @markmandel

roberthbailey avatar Dec 16 '21 07:12 roberthbailey

I'm not sure if it's possible with CRDs, but with built in k8s resources you can sometimes see an expanded table if you pass the -o wide flag (I like with kubectl get nodes or kubectl get pods). That might be another way to do this if we don't want to change the default table output.

roberthbailey avatar Dec 16 '21 07:12 roberthbailey

Also note that you can customize your own table output by passing in -o=custom-columns so even now in the current state you could create a command to make your own table output with the columns that you care about.

roberthbailey avatar Dec 16 '21 07:12 roberthbailey

We should be able to add additional printer columns to CRD according to this pr.

cindy52 avatar Dec 16 '21 18:12 cindy52

Maybe this is something that we could add to a wide output: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#priority

https://github.com/googleforgames/agones/blob/c3fdf24e8f9ac361d416ce56e23598d84a4dfa5c/install/helm/agones/templates/crds/gameserver.yaml#L40-L55

Implementation wise, would need to work out how to enable the feature flag in the helm template though.

Also note that you can customize your own table output by passing in -o=custom-columns so even now in the current state you could create a command to make your own table output with the columns that you care about.

Heh - I used to do this all the time when doing demos, before you could define your own columned output for CRDs! 😃

markmandel avatar Dec 27 '21 05:12 markmandel

'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '

github-actions[bot] avatar Nov 01 '23 10:11 github-actions[bot]

This issue is marked as obsolete due to inactivity for last 60 days. To avoid issue getting closed in next 30 days, please add a comment or add 'awaiting-maintainer' label. Thank you for your contributions

github-actions[bot] avatar Dec 15 '23 02:12 github-actions[bot]