-
Notifications
You must be signed in to change notification settings - Fork 817
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
CRD: added additionalPrinterColumns to GameServer for kubectl #444
CRD: added additionalPrinterColumns to GameServer for kubectl #444
Conversation
Build Succeeded 👏 Build Id: 9063ed92-bfb1-493e-968b-bdb55d3f4735 The following development artifacts have been built, and will exist for the next 30 days:
To install this version:
|
6004ac7
to
baf797e
Compare
Build Succeeded 👏 Build Id: 11587990-a65a-436a-a549-ace6058553f0 The following development artifacts have been built, and will exist for the next 30 days:
To install this version:
|
- JSONPath: .status.gameServer.status.address | ||
name: Address | ||
type: string | ||
- JSONPath: .status.gameServer.status.ports[?(@.name=='default')].port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the user doesn't have a "default" port - does nothing show?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we don't want to show the entire map (probably too wide?) - should we grab the first port in the list, rather than one with the name "default" - just in case? That way we always get a record?
@Kuqd what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we require GS to always have a 'default' port?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also for either the first one or all of them. Don't have a strong opinion, if it's easier the first one would do for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we start with the first one for now - as that is the most simple, and doesn't break anything for anyone. If we find that people really want all ports later on, we can adjust it, or see if there is a way to make it work in a o -wide
scenario.
Also, reorganising the order of ports in the list for output display is far less brittle for users, than forcing people into a naming convention that may not work with their systems.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated GS and FleetAllocation CRD to ports[0]
Output: ``` $ kubectl get gameservers NAME STATE ADDRESS PORT NODE AGE simple-udp-lrw4k-6c8rg Ready 35.247.xx.xx 7741 gke-test-cluster-default-405277ca-2fr0 15m simple-udp-lrw4k-78td7 Ready 35.247.xx.xx 7378 gke-test-cluster-default-405277ca-2fr0 15m simple-udp-lrw4k-8mcwk Ready 35.247.xx.xx 7795 gke-test-cluster-default-405277ca-2fr0 15m simple-udp-lrw4k-wqwsn Allocated 35.247.xx.xx 7301 gke-test-cluster-default-405277ca-2fr0 15m simple-udp-lrw4k-xxj2f Ready 35.247.xx.xx 7052 gke-test-cluster-default-405277ca-2fr0 15m $ kubectl get gameserversets NAME SCHEDULING DESIRED CURRENT ALLOCATED READY AGE simple-udp-lrw4k Packed 10 10 1 9 16m $ kubectl get fleets NAME SCHEDULING DESIRED CURRENT ALLOCATED READY AGE simple-udp Packed 10 10 1 9 16m $ kubectl get fleetallocations NAME STATE ADDRESS PORT NODE AGE simple-udp-sf66j Allocated 35.247.xx.xx 7301 gke-test-cluster-default-405277ca-2fr0 16m ```
4da9a97
to
345a888
Compare
Build Succeeded 👏 Build Id: 8b1d0806-11b5-40fb-9852-8bcc28f32050 The following development artifacts have been built, and will exist for the next 30 days:
To install this version:
|
Build Succeeded 👏 Build Id: 1c9b1911-cb61-4e2e-81c2-e921f4409f34 The following development artifacts have been built, and will exist for the next 30 days:
To install this version:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This only works on Kubernetes >=1.11 and is ignored by older versions.