Skip to content

Commit

Permalink
crd: added additionalPrinterColumns to GameServer
Browse files Browse the repository at this point in the history
This outputs address, default port and status of each gameserver in
kubectl. This only works on Kubernetes >=1.11 and is ignored by older
versions.

```
$ kubectl get gameservers
NAME          STATE       ADDRESS        PORT
gds-example   Unhealthy   35.247.xx.xx   7777
```
  • Loading branch information
jkowalski committed Dec 13, 2018
1 parent 23044f8 commit 6004ac7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions install/helm/agones/templates/crds/gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ spec:
group: stable.agones.dev
version: v1alpha1
scope: Namespaced
additionalPrinterColumns:
- JSONPath: .status.state
name: State
type: string
- JSONPath: .status.address
name: Address
type: string
- JSONPath: .status.ports[?(@.name=='default')].port
name: Port
type: string
names:
kind: GameServer
plural: gameservers
Expand Down
10 changes: 10 additions & 0 deletions install/yaml/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,16 @@ spec:
group: stable.agones.dev
version: v1alpha1
scope: Namespaced
additionalPrinterColumns:
- JSONPath: .status.state
name: State
type: string
- JSONPath: .status.address
name: Address
type: string
- JSONPath: .status.ports[?(@.name=='default')].port
name: Port
type: string
names:
kind: GameServer
plural: gameservers
Expand Down

0 comments on commit 6004ac7

Please sign in to comment.