From 4fa7575007377b4ca4892096683889f75ec6d0b8 Mon Sep 17 00:00:00 2001 From: Alexander Apalikov Date: Mon, 11 Mar 2019 17:23:16 +0300 Subject: [PATCH] Add extended API docs generator Add gen-crd-api-reference-docs utility into build-image, generate Agones CRD reference html document, map this doc to existent docs structure. --- build/build-image/Dockerfile | 5 + build/includes/website.mk | 17 + site/content/en/docs/Guides/access-api.md | 6 +- .../Reference/agones_crd_api_reference.html | 2220 +++++++++++++++++ site/gen-api-docs.sh | 55 + 5 files changed, 2302 insertions(+), 1 deletion(-) create mode 100644 site/content/en/docs/Reference/agones_crd_api_reference.html create mode 100755 site/gen-api-docs.sh diff --git a/build/build-image/Dockerfile b/build/build-image/Dockerfile index 403c5b0e70..c64b80d19f 100644 --- a/build/build-image/Dockerfile +++ b/build/build-image/Dockerfile @@ -103,6 +103,11 @@ RUN cargo install grpcio-compiler --vers 0.3.0 RUN go get -u github.com/golang/dep/cmd/dep && \ go get -u golang.org/x/tools/cmd/goimports +# install API reference docs generator +RUN export GO111MODULE=on && mkdir -p /go/src/github.com/ahmetb && \ + cd /go/src/github.com/ahmetb && git clone https://github.com/ahmetb/gen-crd-api-reference-docs && \ + cd ./gen-crd-api-reference-docs && go build + # install golang-ci linter RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.15.0 diff --git a/build/includes/website.mk b/build/includes/website.mk index ee493af814..b51e0ffcc5 100644 --- a/build/includes/website.mk +++ b/build/includes/website.mk @@ -24,6 +24,22 @@ # Website targets # +REL_PATH := content/en/docs/Reference/agones_crd_api_reference.html +GEN_API_DOCS ?= docker run -e FILE="$(mount_path)/site/$(REL_PATH)" -e VERSION=${base_version} --rm -i $(common_mounts) $(build_tag) bash -c "/go/src/agones.dev/agones/site/gen-api-docs.sh" + +# generate Agones CRD reference docs +gen-api-docs: ensure-build-image + $(GEN_API_DOCS) + +# test generated Agones CRD reference docs +test-gen-api-docs: expected_docs := $(site_path)/$(REL_PATH) +test-gen-api-docs: ensure-build-image + cp $(expected_docs) /tmp/generated.html + sort /tmp/generated.html > /tmp/generated.html.sorted + $(GEN_API_DOCS) + sort $(expected_docs) > /tmp/result.sorted + diff -bB /tmp/result.sorted /tmp/generated.html.sorted + # generate the latest website site-server: ARGS ?=-F site-server: ENV ?= RELEASE_VERSION="$(base_version)" RELEASE_BRANCH=master @@ -59,6 +75,7 @@ site-deploy-preview: site-static-preview site-test: # generate actual html and run test against - provides a more accurate tests + $(MAKE) test-gen-api-docs $(MAKE) site-static-preview docker run --rm -t -e "TERM=xterm-256color" $(common_mounts) $(DOCKER_RUN_ARGS) $(build_tag) bash -c \ "mkdir -p /tmp/website && cp -r $(mount_path)/site/public /tmp/website/site && htmltest -c $(mount_path)/site/htmltest.yaml /tmp/website" \ No newline at end of file diff --git a/site/content/en/docs/Guides/access-api.md b/site/content/en/docs/Guides/access-api.md index 7d370794eb..69471c2758 100644 --- a/site/content/en/docs/Guides/access-api.md +++ b/site/content/en/docs/Guides/access-api.md @@ -10,7 +10,11 @@ description: > --- Installing Agones creates several [Custom Resource Definitions (CRD)](https://kubernetes.io/docs/concepts/api-extension/custom-resources), -which can be accessed and manipulated through the Kubernetes API. +which can be accessed and manipulated through the Kubernetes API. + +{{% feature publishVersion="0.9.0" %}} +The detailed list of Agones CRDs with their parameters could be found here - [Agones CRD API Reference](../../reference/agones_crd_api_reference). +{{% /feature %}} Kubernetes has multiple [client libraries](https://kubernetes.io/docs/reference/using-api/client-libraries/), however, at time of writing, only diff --git a/site/content/en/docs/Reference/agones_crd_api_reference.html b/site/content/en/docs/Reference/agones_crd_api_reference.html new file mode 100644 index 0000000000..c4311a3094 --- /dev/null +++ b/site/content/en/docs/Reference/agones_crd_api_reference.html @@ -0,0 +1,2220 @@ ++++ +title="Agones Kubernetes API" +description="Detailed list of Agones Custom Resource Definitions available" ++++ + +{{% feature publishVersion="0.7.0" %}} +

Packages:

+ +

stable.agones.dev

+

+

Package v1alpha1 is the v1alpha1 version of the API.

+

+Resource Types: + +

Fleet +

+

+

Fleet is the data structure for a Fleet resource

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +stable.agones.dev/v1alpha1 + +
+kind
+string +
Fleet
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +FleetSpec + + +
+
+
+ + + + + + + + + + + + + + + + + +
+replicas
+ +int32 + +
+

Replicas are the number of GameServers that should be in this set

+
+strategy
+ + +Kubernetes apps/v1.DeploymentStrategy + + +
+

Deployment strategy

+
+scheduling
+ + +SchedulingStrategy + + +
+

Scheduling strategy. Defaults to “Packed”.

+
+template
+ + +GameServerTemplateSpec + + +
+

Template the GameServer template to apply for this Fleet

+
+
+status
+ + +FleetStatus + + +
+
+

FleetAllocation +

+

+

FleetAllocation is the data structure for allocating against a Fleet

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +stable.agones.dev/v1alpha1 + +
+kind
+string +
FleetAllocation
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +FleetAllocationSpec + + +
+
+
+ + + + + + + + + +
+fleetName
+ +string + +
+
+metadata
+ + +MetaPatch + + +
+
+
+status
+ + +FleetAllocationStatus + + +
+
+

FleetAutoscaler +

+

+

FleetAutoscaler is the data structure for a FleetAutoscaler resource

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +stable.agones.dev/v1alpha1 + +
+kind
+string +
FleetAutoscaler
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +FleetAutoscalerSpec + + +
+
+
+ + + + + + + + + +
+fleetName
+ +string + +
+
+policy
+ + +FleetAutoscalerPolicy + + +
+

Autoscaling policy

+
+
+status
+ + +FleetAutoscalerStatus + + +
+
+

GameServer +

+

+(Appears on: +FleetAllocationStatus) +

+

+

GameServer is the data structure for a gameserver resource

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +stable.agones.dev/v1alpha1 + +
+kind
+string +
GameServer
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +GameServerSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+container
+ +string + +
+

Container specifies which Pod container is the game server. Only required if there is more than one +container defined

+
+ports
+ + +[]GameServerPort + + +
+

Ports are the array of ports that can be exposed via the game server

+
+health
+ + +Health + + +
+

Health configures health checking

+
+scheduling
+ + +SchedulingStrategy + + +
+

Scheduling strategy. Defaults to “Packed”.

+
+template
+ + +Kubernetes core/v1.PodTemplateSpec + + +
+

Template describes the Pod that will be created for the GameServer

+
+
+status
+ + +GameServerStatus + + +
+
+

GameServerAllocation +

+

+

GameServerAllocation is the data structure for allocating against a set of +GameServers, defined required and preferred selectors

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +stable.agones.dev/v1alpha1 + +
+kind
+string +
GameServerAllocation
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +GameServerAllocationSpec + + +
+
+
+ + + + + + + + + + + + + + + + + +
+required
+ + +Kubernetes meta/v1.LabelSelector + + +
+

Required The required allocation. Defaults to all GameServers.

+
+preferred
+ + +[]Kubernetes meta/v1.LabelSelector + + +
+

Preferred ordered list of preferred allocations out of the required set. +If the first selector is not matched, +the selection attempts the second selector, and so on.

+
+scheduling
+ + +SchedulingStrategy + + +
+

Scheduling strategy. Defaults to “Packed”.

+
+metadata
+ + +MetaPatch + + +
+

MetaPatch is optional custom metadata that is added to the game server at allocation +You can use this to tell the server necessary session data

+
+
+status
+ + +GameServerAllocationStatus + + +
+
+

GameServerSet +

+

+

GameServerSet is the data structure a set of GameServers +This matches philosophically with the relationship between +Depoyments and ReplicaSets

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +stable.agones.dev/v1alpha1 + +
+kind
+string +
GameServerSet
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +GameServerSetSpec + + +
+
+
+ + + + + + + + + + + + + +
+replicas
+ +int32 + +
+

Replicas are the number of GameServers that should be in this set

+
+scheduling
+ + +SchedulingStrategy + + +
+

Scheduling strategy. Defaults to “Packed”.

+
+template
+ + +GameServerTemplateSpec + + +
+

Template the GameServer template to apply for this GameServerSet

+
+
+status
+ + +GameServerSetStatus + + +
+
+

BufferPolicy +

+

+(Appears on: +FleetAutoscalerPolicy) +

+

+

BufferPolicy controls the desired behavior of the buffer policy.

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+maxReplicas
+ +int32 + +
+

MaxReplicas is the maximum amount of replicas that the fleet may have. +It must be bigger than both MinReplicas and BufferSize

+
+minReplicas
+ +int32 + +
+

MinReplicas is the minimum amount of replicas that the fleet must have +If zero, it is ignored. +If non zero, it must be smaller than MaxReplicas and bigger than BufferSize

+
+bufferSize
+ +k8s.io/apimachinery/pkg/util/intstr.IntOrString + +
+

BufferSize defines how many replicas the autoscaler tries to have ready all the time +Value can be an absolute number (ex: 5) or a percentage of desired gs instances (ex: 15%) +Absolute number is calculated from percentage by rounding up. +Example: when this is set to 20%, the autoscaler will make sure that 20% +of the fleet’s game server replicas are ready. When this is set to 20, +the autoscaler will make sure that there are 20 available game servers +Must be bigger than 0 +Note: by “ready” we understand in this case “non-allocated”; this is done to ensure robustness +and computation stability in different edge case (fleet just created, not enough +capacity in the cluster etc)

+
+

FleetAllocationSpec +

+

+(Appears on: +FleetAllocation) +

+

+

FleetAllocationSpec is the spec for a Fleet +Allocation

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+fleetName
+ +string + +
+
+metadata
+ + +MetaPatch + + +
+
+

FleetAllocationStatus +

+

+(Appears on: +FleetAllocation) +

+

+

FleetAllocationStatus will contain the +GameServer that has been allocated from +a Fleet

+

+ + + + + + + + + + + + + +
FieldDescription
+gameServer
+ + +GameServer + + +
+
+

FleetAutoscaleRequest +

+

+(Appears on: +FleetAutoscaleReview) +

+

+

FleetAutoscaleRequest defines the request to webhook autoscaler endpoint

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+uid
+ +k8s.io/apimachinery/pkg/types.UID + +
+

UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are +otherwise identical (parallel requests, requests when earlier requests did not modify etc) +The UID is meant to track the round trip (request/response) between the Autoscaler and the WebHook, not the user request. +It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.

+
+name
+ +string + +
+

Name is the name of the Fleet being scaled

+
+namespace
+ +string + +
+

Namespace is the namespace associated with the request (if any).

+
+status
+ + +FleetStatus + + +
+

The Fleet’s status values

+
+

FleetAutoscaleResponse +

+

+(Appears on: +FleetAutoscaleReview) +

+

+

FleetAutoscaleResponse defines the response of webhook autoscaler endpoint

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+uid
+ +k8s.io/apimachinery/pkg/types.UID + +
+

UID is an identifier for the individual request/response. +This should be copied over from the corresponding FleetAutoscaleRequest.

+
+scale
+ +bool + +
+

Set to false if no scaling should occur to the Fleet

+
+replicas
+ +int32 + +
+

The targeted replica count

+
+

FleetAutoscaleReview +

+

+

FleetAutoscaleReview is passed to the webhook with a populated Request value, +and then returned with a populated Response.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+request
+ + +FleetAutoscaleRequest + + +
+
+response
+ + +FleetAutoscaleResponse + + +
+
+

FleetAutoscalerPolicy +

+

+(Appears on: +FleetAutoscalerSpec) +

+

+

FleetAutoscalerPolicy describes how to scale a fleet

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+type
+ + +FleetAutoscalerPolicyType + + +
+

Type of autoscaling policy.

+
+buffer
+ + +BufferPolicy + + +
+(Optional) +

Buffer policy config params. Present only if FleetAutoscalerPolicyType = Buffer.

+
+webhook
+ + +WebhookPolicy + + +
+(Optional) +

Webhook policy config params. Present only if FleetAutoscalerPolicyType = Webhook.

+
+

FleetAutoscalerPolicyType +(string alias)

+

+(Appears on: +FleetAutoscalerPolicy) +

+

+

FleetAutoscalerPolicyType is the policy for autoscaling +for a given Fleet

+

+

FleetAutoscalerSpec +

+

+(Appears on: +FleetAutoscaler) +

+

+

FleetAutoscalerSpec is the spec for a Fleet Scaler

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+fleetName
+ +string + +
+
+policy
+ + +FleetAutoscalerPolicy + + +
+

Autoscaling policy

+
+

FleetAutoscalerStatus +

+

+(Appears on: +FleetAutoscaler) +

+

+

FleetAutoscalerStatus defines the current status of a FleetAutoscaler

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+currentReplicas
+ +int32 + +
+

CurrentReplicas is the current number of gameserver replicas +of the fleet managed by this autoscaler, as last seen by the autoscaler

+
+desiredReplicas
+ +int32 + +
+

DesiredReplicas is the desired number of gameserver replicas +of the fleet managed by this autoscaler, as last calculated by the autoscaler

+
+lastScaleTime
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

lastScaleTime is the last time the FleetAutoscaler scaled the attached fleet,

+
+ableToScale
+ +bool + +
+

AbleToScale indicates that we can access the target fleet

+
+scalingLimited
+ +bool + +
+

ScalingLimited indicates that the calculated scale would be above or below the range +defined by MinReplicas and MaxReplicas, and has thus been capped.

+
+

FleetSpec +

+

+(Appears on: +Fleet) +

+

+

FleetSpec is the spec for a Fleet

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+replicas
+ +int32 + +
+

Replicas are the number of GameServers that should be in this set

+
+strategy
+ + +Kubernetes apps/v1.DeploymentStrategy + + +
+

Deployment strategy

+
+scheduling
+ + +SchedulingStrategy + + +
+

Scheduling strategy. Defaults to “Packed”.

+
+template
+ + +GameServerTemplateSpec + + +
+

Template the GameServer template to apply for this Fleet

+
+

FleetStatus +

+

+(Appears on: +Fleet, +FleetAutoscaleRequest) +

+

+

FleetStatus is the status of a Fleet

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+replicas
+ +int32 + +
+

Replicas the total number of current GameServer replicas

+
+readyReplicas
+ +int32 + +
+

ReadyReplicas are the number of Ready GameServer replicas

+
+allocatedReplicas
+ +int32 + +
+

AllocatedReplicas are the number of Allocated GameServer replicas

+
+

GameServerAllocationSpec +

+

+(Appears on: +GameServerAllocation) +

+

+

GameServerAllocationSpec is the spec for a GameServerAllocation

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+required
+ + +Kubernetes meta/v1.LabelSelector + + +
+

Required The required allocation. Defaults to all GameServers.

+
+preferred
+ + +[]Kubernetes meta/v1.LabelSelector + + +
+

Preferred ordered list of preferred allocations out of the required set. +If the first selector is not matched, +the selection attempts the second selector, and so on.

+
+scheduling
+ + +SchedulingStrategy + + +
+

Scheduling strategy. Defaults to “Packed”.

+
+metadata
+ + +MetaPatch + + +
+

MetaPatch is optional custom metadata that is added to the game server at allocation +You can use this to tell the server necessary session data

+
+

GameServerAllocationState +(string alias)

+

+(Appears on: +GameServerAllocationStatus) +

+

+

GameServerAllocationState is the Allocation state

+

+

GameServerAllocationStatus +

+

+(Appears on: +GameServerAllocation) +

+

+

GameServerAllocationStatus is the status for an GameServerAllocation resource

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+state
+ + +GameServerAllocationState + + +
+

GameServerState is the current state of an GameServerAllocation, e.g. Allocated, or UnAllocated

+
+gameServerName
+ +string + +
+
+ports
+ + +[]GameServerStatusPort + + +
+
+address
+ +string + +
+
+nodeName
+ +string + +
+
+

GameServerPort +

+

+(Appears on: +GameServerSpec) +

+

+

GameServerPort defines a set of Ports that +are to be exposed via the GameServer

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the descriptive name of the port

+
+portPolicy
+ + +PortPolicy + + +
+

PortPolicy defines the policy for how the HostPort is populated. +Dynamic port will allocate a HostPort within the selected MIN_PORT and MAX_PORT range passed to the controller +at installation time. +When static is the policy specified, HostPort is required, to specify the port that game clients will +connect to

+
+containerPort
+ +int32 + +
+

ContainerPort is the port that is being opened on the game server process

+
+hostPort
+ +int32 + +
+

HostPort the port exposed on the host for clients to connect to

+
+protocol
+ + +Kubernetes core/v1.Protocol + + +
+

Protocol is the network protocol being used. Defaults to UDP. TCP is the only other option

+
+

GameServerSetSpec +

+

+(Appears on: +GameServerSet) +

+

+

GameServerSetSpec the specification for

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+replicas
+ +int32 + +
+

Replicas are the number of GameServers that should be in this set

+
+scheduling
+ + +SchedulingStrategy + + +
+

Scheduling strategy. Defaults to “Packed”.

+
+template
+ + +GameServerTemplateSpec + + +
+

Template the GameServer template to apply for this GameServerSet

+
+

GameServerSetStatus +

+

+(Appears on: +GameServerSet) +

+

+

GameServerSetStatus is the status of a GameServerSet

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+replicas
+ +int32 + +
+

Replicas the total number of current GameServer replicas

+
+readyReplicas
+ +int32 + +
+

ReadyReplicas are the number of Ready GameServer replicas

+
+allocatedReplicas
+ +int32 + +
+

AllocatedReplicas are the number of Allocated GameServer replicas

+
+

GameServerSpec +

+

+(Appears on: +GameServer, +GameServerTemplateSpec) +

+

+

GameServerSpec is the spec for a GameServer resource

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+container
+ +string + +
+

Container specifies which Pod container is the game server. Only required if there is more than one +container defined

+
+ports
+ + +[]GameServerPort + + +
+

Ports are the array of ports that can be exposed via the game server

+
+health
+ + +Health + + +
+

Health configures health checking

+
+scheduling
+ + +SchedulingStrategy + + +
+

Scheduling strategy. Defaults to “Packed”.

+
+template
+ + +Kubernetes core/v1.PodTemplateSpec + + +
+

Template describes the Pod that will be created for the GameServer

+
+

GameServerState +(string alias)

+

+(Appears on: +GameServerStatus) +

+

+

GameServerState is the state for the GameServer

+

+

GameServerStatus +

+

+(Appears on: +GameServer) +

+

+

GameServerStatus is the status for a GameServer resource

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+state
+ + +GameServerState + + +
+

GameServerState is the current state of a GameServer, e.g. Creating, Starting, Ready, etc

+
+ports
+ + +[]GameServerStatusPort + + +
+
+address
+ +string + +
+
+nodeName
+ +string + +
+
+

GameServerStatusPort +

+

+(Appears on: +GameServerAllocationStatus, +GameServerStatus) +

+

+

GameServerStatusPort shows the port that was allocated to a +GameServer.

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+
+port
+ +int32 + +
+
+

GameServerTemplateSpec +

+

+(Appears on: +FleetSpec, +GameServerSetSpec) +

+

+

GameServerTemplateSpec is a template for GameServers

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +GameServerSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+container
+ +string + +
+

Container specifies which Pod container is the game server. Only required if there is more than one +container defined

+
+ports
+ + +[]GameServerPort + + +
+

Ports are the array of ports that can be exposed via the game server

+
+health
+ + +Health + + +
+

Health configures health checking

+
+scheduling
+ + +SchedulingStrategy + + +
+

Scheduling strategy. Defaults to “Packed”.

+
+template
+ + +Kubernetes core/v1.PodTemplateSpec + + +
+

Template describes the Pod that will be created for the GameServer

+
+
+

Health +

+

+(Appears on: +GameServerSpec) +

+

+

Health configures health checking on the GameServer

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+disabled
+ +bool + +
+

Disabled is whether health checking is disabled or not

+
+periodSeconds
+ +int32 + +
+

PeriodSeconds is the number of seconds each health ping has to occur in

+
+failureThreshold
+ +int32 + +
+

FailureThreshold how many failures in a row constitutes unhealthy

+
+initialDelaySeconds
+ +int32 + +
+

InitialDelaySeconds initial delay before checking health

+
+

MetaPatch +

+

+(Appears on: +FleetAllocationSpec, +GameServerAllocationSpec) +

+

+

MetaPatch is the metadata used to patch the GameServer metadata on allocation

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+labels
+ +map[string]string + +
+
+annotations
+ +map[string]string + +
+
+

PortPolicy +(string alias)

+

+(Appears on: +GameServerPort) +

+

+

PortPolicy is the port policy for the GameServer

+

+

SchedulingStrategy +(string alias)

+

+(Appears on: +FleetSpec, +GameServerAllocationSpec, +GameServerSetSpec, +GameServerSpec) +

+

+

SchedulingStrategy is the strategy that a Fleet & GameServers will use +when scheduling GameServers’ Pods across a cluster.

+

+

WebhookPolicy +

+

+(Appears on: +FleetAutoscalerPolicy) +

+

+

WebhookPolicy controls the desired behavior of the webhook policy. +It contains the description of the webhook autoscaler service +used to form url which is accessible inside the cluster

+

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+url
+ +string + +
+(Optional) +

url gives the location of the webhook, in standard URL form +(scheme://host:port/path). Exactly one of url or service +must be specified.

+

The host should not refer to a service running in the cluster; use +the service field instead. The host might be resolved via external +DNS in some apiservers (e.g., kube-apiserver cannot resolve +in-cluster DNS as that would be a layering violation). host may +also be an IP address.

+

Please note that using localhost or 127.0.0.1 as a host is +risky unless you take great care to run this webhook on all hosts +which run an apiserver which might need to make calls to this +webhook. Such installs are likely to be non-portable, i.e., not easy +to turn up in a new cluster.

+

The scheme must be “https”; the URL must begin with “https://”.

+

A path is optional, and if present may be any string permissible in +a URL. You may use the path to pass an arbitrary string to the +webhook, for example, a cluster identifier.

+

Attempting to use a user or basic auth e.g. “user:password@” is not +allowed. Fragments (“#…”) and query parameters (“?…”) are not +allowed, either.

+
+service
+ + +Kubernetes admissionregistration/v1beta1.ServiceReference + + +
+(Optional) +

service is a reference to the service for this webhook. Either +service or url must be specified.

+

If the webhook is running within the cluster, then you should use service.

+

Port 443 will be used if it is open, otherwise it is an error.

+
+caBundle
+ +[]byte + +
+(Optional) +

caBundle is a PEM encoded CA bundle which will be used to validate the webhook’s server certificate. +If unspecified, system trust roots on the apiserver are used.

+
+
+

+Generated with gen-crd-api-reference-docs +on git commit 7e7bd71. +

+{{% /feature %}} + diff --git a/site/gen-api-docs.sh b/site/gen-api-docs.sh new file mode 100755 index 0000000000..8760277700 --- /dev/null +++ b/site/gen-api-docs.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# Copyright 2019 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cd /go/src/github.com/ahmetb/gen-crd-api-reference-docs +export GO111MODULE=on +FILE=${FILE:-/go/src/agones.dev/agones/site/content/en/docs/Reference/agones_crd_api_reference.html} +VERSION=${VERSION:-"0.9.0"} + +HEAD="/tmp/head.html" +RESULT="/tmp/agones_crd_api_reference.html" +OLD="/tmp/old_docs.html" + +./gen-crd-api-reference-docs --config ./example-config.json --api-dir ../../../agones.dev/agones/pkg/apis/stable/v1alpha1/ --out-file $RESULT +awk '/\ feature\ publishVersion/{flag=1;next}/\ \/feature/{flag=0}flag' $FILE > $OLD + +awk '//{flag=1}/\ feature\ publishVersion/{flag=0;exit}flag' $FILE > $HEAD +doc_version=$(grep 'feature publishVersion=' $FILE ) +echo $doc_version +publish='{{% feature publishVersion="'$VERSION'" %}}' +expiry='{{% feature expiryVersion="'$VERSION'" %}}' +function sedeasy { + sed -i "s/$(echo $1 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')/$(echo $2 | sed -e 's/[\/&]/\\&/g')/g" $3 +} + +echo $publish +diff $RESULT $OLD +if [ $? -gt 0 ] +then +echo "Output to a file $FILE" + +if [ "$publish" != "$doc_version" ] +then + echo "Tagging old docs with expiryVersion shortcode" + + sedeasy "$doc_version" "$expiry" $FILE + cat $FILE > $HEAD +fi +cat $HEAD > $FILE +echo -e '\n{{% feature publishVersion="'$VERSION'" %}}' >> $FILE +cat $RESULT >> $FILE +echo -e '{{% /feature %}}\n' >> $FILE +fi