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

Fix "kubectl explain" output for Agones CRDs #2423

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

{{/* schema for a gameserver spec */}}
{{- define "gameserver.schema" }}
description: 'GameServer is the data structure for a GameServer resource.'
type: object
required:
- spec
Expand All @@ -23,6 +24,8 @@ properties:
{{- include "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" . | indent 4 }}
{{- end}}
spec:
description: 'GameServerSpec is the spec for a GameServer resource. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServer'
type: object
required:
- template
Expand Down Expand Up @@ -90,7 +93,7 @@ properties:
title: Parameters for the SDK Server (sidecar)
properties:
logLevel:
type: string
type: string
description: |
sdkServer log level parameter has three options:
- "Info" (default) The SDK server will output all messages except for debug messages
Expand Down
2 changes: 2 additions & 0 deletions install/helm/agones/templates/crds/_gameserverstatus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
{{/* schema for a gameserver status */}}
{{- define "gameserver.status" }}
status:
description: 'GameServerStatus is the status for a GameServer resource. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServer'
type: object
title: The status values for the GameServer
properties:
Expand Down
5 changes: 5 additions & 0 deletions install/helm/agones/templates/crds/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ spec:
type: date
schema:
openAPIV3Schema:
description: 'Fleet is the data structure for a Fleet resource'
type: object
properties:
spec:
description: 'FleetSpec is the spec for a Fleet. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.Fleet'
type: object
required:
- template
Expand Down Expand Up @@ -99,6 +102,8 @@ spec:
{{- $data := dict "metadata" true "podPreserveUnknownFields" .Values.gameservers.podPreserveUnknownFields }}
{{- include "gameserver.schema" $data | indent 17 }}
status:
description: 'FleetStatus is the status of a Fleet. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.Fleet'
type: object
properties:
replicas:
Expand Down
5 changes: 5 additions & 0 deletions install/helm/agones/templates/crds/fleetautoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ spec:
storage: true
schema:
openAPIV3Schema:
description: 'FleetAutoscaler is the data structure for a FleetAutoscaler resource.'
type: object
properties:
spec:
description: 'FleetAutoscalerSpec is the spec for a Fleet Scaler. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#autoscaling.agones.dev/v1.FleetAutoscaler'
type: object
required:
- fleetName
Expand Down Expand Up @@ -122,6 +125,8 @@ spec:
minimum: 0
exclusiveMinimum: true
status:
description: 'FleetAutoscalerStatus defines the current status of a FleetAutoscaler. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#autoscaling.agones.dev/v1.FleetAutoscaler'
type: object
properties:
currentReplicas:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ spec:
storage: true
schema:
openAPIV3Schema:
description: 'GameServerAllocationPolicy is the Schema for the gameserverallocationpolicies API.'
type: object
properties:
spec:
description: 'GameServerAllocationPolicySpec defines the desired state of GameServerAllocationPolicy. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#multicluster.agones.dev/v1.GameServerAllocationPolicy'
type: object
required:
- priority
Expand Down
5 changes: 5 additions & 0 deletions install/helm/agones/templates/crds/gameserverset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ spec:
type: date
schema:
openAPIV3Schema:
description: 'GameServerSet is the data structure for a set of GameServers.'
type: object
properties:
spec:
description: 'GameServerSetSpec the specification for GameServerSet. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerSet'
type: object
required:
- replicas
Expand All @@ -79,6 +82,8 @@ spec:
{{- $data := dict "metadata" true "podPreserveUnknownFields" .Values.gameservers.podPreserveUnknownFields }}
{{- include "gameserver.schema" $data | indent 18 }}
status:
description: 'GameServerSetStatus is the status of a GameServerSet. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerSet'
type: object
properties:
replicas:
Expand Down
35 changes: 32 additions & 3 deletions install/yaml/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,12 @@ spec:
type: date
schema:
openAPIV3Schema:
description: 'Fleet is the data structure for a Fleet resource'
type: object
properties:
spec:
description: 'FleetSpec is the spec for a Fleet. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.Fleet'
type: object
required:
- template
Expand Down Expand Up @@ -224,6 +227,7 @@ spec:
- type: integer
- type: string
template:
description: 'GameServer is the data structure for a GameServer resource.'
type: object
required:
- spec
Expand Down Expand Up @@ -363,6 +367,8 @@ spec:
Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
type: string
spec:
description: 'GameServerSpec is the spec for a GameServer resource. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServer'
type: object
required:
- template
Expand Down Expand Up @@ -4425,7 +4431,7 @@ spec:
title: Parameters for the SDK Server (sidecar)
properties:
logLevel:
type: string
type: string
description: |
sdkServer log level parameter has three options:
- "Info" (default) The SDK server will output all messages except for debug messages
Expand Down Expand Up @@ -4486,6 +4492,8 @@ spec:
title: The initial player capacity of this Game Server
minimum: 0
status:
description: 'FleetStatus is the status of a Fleet. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.Fleet'
type: object
properties:
replicas:
Expand Down Expand Up @@ -4562,9 +4570,12 @@ spec:
storage: true
schema:
openAPIV3Schema:
description: 'FleetAutoscaler is the data structure for a FleetAutoscaler resource.'
type: object
properties:
spec:
description: 'FleetAutoscalerSpec is the spec for a Fleet Scaler. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#autoscaling.agones.dev/v1.FleetAutoscaler'
type: object
required:
- fleetName
Expand Down Expand Up @@ -4645,6 +4656,8 @@ spec:
minimum: 0
exclusiveMinimum: true
status:
description: 'FleetAutoscalerStatus defines the current status of a FleetAutoscaler. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#autoscaling.agones.dev/v1.FleetAutoscaler'
type: object
properties:
currentReplicas:
Expand Down Expand Up @@ -4719,11 +4732,14 @@ spec:
type: date
schema:
openAPIV3Schema:
description: 'GameServer is the data structure for a GameServer resource.'
type: object
required:
- spec
properties:
spec:
description: 'GameServerSpec is the spec for a GameServer resource. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServer'
type: object
required:
- template
Expand Down Expand Up @@ -8786,7 +8802,7 @@ spec:
title: Parameters for the SDK Server (sidecar)
properties:
logLevel:
type: string
type: string
description: |
sdkServer log level parameter has three options:
- "Info" (default) The SDK server will output all messages except for debug messages
Expand Down Expand Up @@ -8847,6 +8863,8 @@ spec:
title: The initial player capacity of this Game Server
minimum: 0
status:
description: 'GameServerStatus is the status for a GameServer resource. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServer'
type: object
title: The status values for the GameServer
properties:
Expand Down Expand Up @@ -8935,9 +8953,12 @@ spec:
storage: true
schema:
openAPIV3Schema:
description: 'GameServerAllocationPolicy is the Schema for the gameserverallocationpolicies API.'
type: object
properties:
spec:
description: 'GameServerAllocationPolicySpec defines the desired state of GameServerAllocationPolicy. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#multicluster.agones.dev/v1.GameServerAllocationPolicy'
type: object
required:
- priority
Expand Down Expand Up @@ -9031,9 +9052,12 @@ spec:
type: date
schema:
openAPIV3Schema:
description: 'GameServerSet is the data structure for a set of GameServers.'
type: object
properties:
spec:
description: 'GameServerSetSpec the specification for GameServerSet. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerSet'
type: object
required:
- replicas
Expand All @@ -9048,6 +9072,7 @@ spec:
- Packed
- Distributed
template:
description: 'GameServer is the data structure for a GameServer resource.'
type: object
required:
- spec
Expand Down Expand Up @@ -9187,6 +9212,8 @@ spec:
Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
type: string
spec:
description: 'GameServerSpec is the spec for a GameServer resource. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServer'
type: object
required:
- template
Expand Down Expand Up @@ -13249,7 +13276,7 @@ spec:
title: Parameters for the SDK Server (sidecar)
properties:
logLevel:
type: string
type: string
description: |
sdkServer log level parameter has three options:
- "Info" (default) The SDK server will output all messages except for debug messages
Expand Down Expand Up @@ -13310,6 +13337,8 @@ spec:
title: The initial player capacity of this Game Server
minimum: 0
status:
description: 'GameServerSetStatus is the status of a GameServerSet. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerSet'
type: object
properties:
replicas:
Expand Down