diff --git a/build/build-image/Dockerfile b/build/build-image/Dockerfile index 5a90189a21..4f2af869c0 100644 --- a/build/build-image/Dockerfile +++ b/build/build-image/Dockerfile @@ -89,7 +89,7 @@ RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ # install API reference docs generator RUN mkdir -p /go/src/github.com/ahmetb && \ - cd /go/src/github.com/ahmetb && git clone -b v0.1.1 https://github.com/ahmetb/gen-crd-api-reference-docs && \ + cd /go/src/github.com/ahmetb && git clone -b v0.2.0 https://github.com/ahmetb/gen-crd-api-reference-docs && \ cd ./gen-crd-api-reference-docs && go build # html checker diff --git a/site/.gitignore b/site/.gitignore index c718fcf522..720e22f354 100644 --- a/site/.gitignore +++ b/site/.gitignore @@ -4,3 +4,4 @@ resources/ node_modules/ tech-doc-hugo *.json +!/assets/templates/crd-doc-config.json diff --git a/site/assets/templates/crd-doc-config.json b/site/assets/templates/crd-doc-config.json new file mode 100644 index 0000000000..47e25111d5 --- /dev/null +++ b/site/assets/templates/crd-doc-config.json @@ -0,0 +1,28 @@ +{ + "hideMemberFields": [ + "TypeMeta" + ], + "hideTypePatterns": [ + "ParseError$", + "List$" + ], + "externalPackages": [ + { + "typeMatchPrefix": "^k8s\\.io/apimachinery/pkg/apis/meta/v1\\.Duration$", + "docsURLTemplate": "https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration" + }, + { + "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", + "docsURLTemplate": "https://v1-15.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.15/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}" + }, + { + "typeMatchPrefix": "^github\\.com/knative/pkg/apis/duck/", + "docsURLTemplate": "https://godoc.org/github.com/knative/pkg/apis/duck/{{arrIndex .PackageSegments -1}}#{{.TypeIdentifier}}" + } + ], + "typeDisplayNamePrefixOverrides": { + "k8s.io/api/": "Kubernetes ", + "k8s.io/apimachinery/pkg/apis/": "Kubernetes " + }, + "markdownDisabled": false +} \ No newline at end of file diff --git a/site/assets/templates/pkg.tpl b/site/assets/templates/pkg.tpl index 90944e39ad..6619fca5e8 100644 --- a/site/assets/templates/pkg.tpl +++ b/site/assets/templates/pkg.tpl @@ -5,21 +5,23 @@
- {{ safe (renderComments .) }} -
+ {{ with (index .GoPackages 0 )}} + {{ with .DocComments }} ++ {{ safe (renderComments .) }} +
+ {{ end }} {{ end }} Resource Types: @@ -27,7 +29,7 @@ {{- range (visibleTypes (sortedTypes .Types)) -}} {{ if isExportedType . -}}metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -103,7 +103,7 @@ strategy
-
+
Kubernetes apps/v1.DeploymentStrategy
@@ -191,7 +191,7 @@ metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -280,7 +280,7 @@ template
-
+
Kubernetes core/v1.PodTemplateSpec
@@ -356,7 +356,7 @@ metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -503,7 +503,7 @@ strategy
-
+
Kubernetes apps/v1.DeploymentStrategy
@@ -704,7 +704,7 @@ protocol
-
+
Kubernetes core/v1.Protocol
@@ -943,7 +943,7 @@ template
-
+
Kubernetes core/v1.PodTemplateSpec
@@ -1043,7 +1043,7 @@ reservedUntil
-
+
Kubernetes meta/v1.Time
@@ -1131,7 +1131,7 @@ metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -1220,7 +1220,7 @@ template
-
+
Kubernetes core/v1.PodTemplateSpec
@@ -1505,7 +1505,7 @@ metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -1546,7 +1546,7 @@ required
-
+
Kubernetes meta/v1.LabelSelector
@@ -1559,7 +1559,7 @@ preferred
-
+
[]Kubernetes meta/v1.LabelSelector
@@ -1647,7 +1647,7 @@ required
-
+
Kubernetes meta/v1.LabelSelector
@@ -1660,7 +1660,7 @@ preferred
-
+
[]Kubernetes meta/v1.LabelSelector
@@ -1851,7 +1851,7 @@ policySelector
-
+
Kubernetes meta/v1.LabelSelector
@@ -1904,7 +1904,7 @@ metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -2349,7 +2349,7 @@ lastScaleTime
-
+
Kubernetes meta/v1.Time
@@ -2438,7 +2438,7 @@ service
-
+
Kubernetes admissionregistration/v1beta1.ServiceReference
@@ -2512,7 +2512,7 @@ metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -2769,31 +2769,31 @@ Packages:
Package v1 is the v1 version of the API.
Resource Types: -
Fleet is the data structure for a Fleet resource
@@ -2827,7 +2827,7 @@metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -2841,7 +2841,7 @@ spec
-
+
FleetSpec
@@ -2865,7 +2865,7 @@ strategy
-
+
Kubernetes apps/v1.DeploymentStrategy
@@ -2889,7 +2889,7 @@ template
-
+
GameServerTemplateSpec
@@ -2905,7 +2905,7 @@ status
-
+
FleetStatus
@@ -2915,7 +2915,7 @@
GameServer is the data structure for a GameServer resource. @@ -2953,7 +2953,7 @@
metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -2967,7 +2967,7 @@ spec
-
+
GameServerSpec
@@ -2992,7 +2992,7 @@ ports
-
+
[]GameServerPort
@@ -3005,7 +3005,7 @@ health
-
+
Health
@@ -3029,7 +3029,7 @@ sdkServer
-
+
SdkServer
@@ -3042,7 +3042,7 @@ template
-
+
Kubernetes core/v1.PodTemplateSpec
@@ -3055,7 +3055,7 @@ players
-
+
PlayersSpec
@@ -3072,7 +3072,7 @@ status
-
+
GameServerStatus
@@ -3082,7 +3082,7 @@
GameServerSet is the data structure for a set of GameServers. @@ -3118,7 +3118,7 @@
metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -3132,7 +3132,7 @@ spec
-
+
GameServerSetSpec
@@ -3167,7 +3167,7 @@ template
-
+
GameServerTemplateSpec
@@ -3183,7 +3183,7 @@ status
-
+
GameServerSetStatus
@@ -3193,12 +3193,12 @@ (Appears on: -FleetStatus, -GameServerSetStatus) +FleetStatus, +GameServerSetStatus)
AggregatedPlayerStatus stores total player tracking values
@@ -3233,11 +3233,11 @@
FleetSpec is the spec for a Fleet
@@ -3265,7 +3265,7 @@strategy
-
+
Kubernetes apps/v1.DeploymentStrategy
@@ -3289,7 +3289,7 @@ template
-
+
GameServerTemplateSpec
@@ -3300,12 +3300,12 @@ (Appears on: -Fleet, -FleetAutoscaleRequest) +Fleet, +FleetAutoscaleRequest)
FleetStatus is the status of a Fleet
@@ -3367,7 +3367,7 @@players
-
+
AggregatedPlayerStatus
@@ -3381,11 +3381,11 @@ (Appears on: -GameServerSpec) +GameServerSpec)
GameServerPort defines a set of Ports that @@ -3414,7 +3414,7 @@
portPolicy
-
+
PortPolicy
@@ -3466,7 +3466,7 @@ protocol
-
+
Kubernetes core/v1.Protocol
@@ -3477,11 +3477,11 @@ (Appears on: -GameServerSet) +GameServerSet)
GameServerSetSpec the specification for GameServerSet
@@ -3520,7 +3520,7 @@template
-
+
GameServerTemplateSpec
@@ -3531,11 +3531,11 @@ (Appears on: -GameServerSet) +GameServerSet)
GameServerSetStatus is the status of a GameServerSet
@@ -3607,7 +3607,7 @@players
-
+
AggregatedPlayerStatus
@@ -3621,12 +3621,12 @@ (Appears on: -GameServer, -GameServerTemplateSpec) +GameServer, +GameServerTemplateSpec)
GameServerSpec is the spec for a GameServer resource
@@ -3655,7 +3655,7 @@ports
-
+
[]GameServerPort
@@ -3668,7 +3668,7 @@ health
-
+
Health
@@ -3692,7 +3692,7 @@ sdkServer
-
+
SdkServer
@@ -3705,7 +3705,7 @@ template
-
+
Kubernetes core/v1.PodTemplateSpec
@@ -3718,7 +3718,7 @@ players
-
+
PlayersSpec
@@ -3730,20 +3730,20 @@ string
alias)(Appears on: -GameServerStatus) +GameServerStatus)
GameServerState is the state for the GameServer
-(Appears on: -GameServer) +GameServer)
GameServerStatus is the status for a GameServer resource
@@ -3760,7 +3760,7 @@state
-
+
GameServerState
@@ -3773,7 +3773,7 @@ ports
-
+
[]GameServerStatusPort
@@ -3805,7 +3805,7 @@ reservedUntil
-
+
Kubernetes meta/v1.Time
@@ -3817,7 +3817,7 @@ players
-
+
PlayerStatus
@@ -3830,12 +3830,12 @@ (Appears on: -GameServerAllocationStatus, -GameServerStatus) +GameServerAllocationStatus, +GameServerStatus)
GameServerStatusPort shows the port that was allocated to a @@ -3871,12 +3871,12 @@
(Appears on: -FleetSpec, -GameServerSetSpec) +FleetSpec, +GameServerSetSpec)
GameServerTemplateSpec is a template for GameServers
@@ -3893,7 +3893,7 @@metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -3907,7 +3907,7 @@ spec
-
+
GameServerSpec
@@ -3932,7 +3932,7 @@ ports
-
+
[]GameServerPort
@@ -3945,7 +3945,7 @@ health
-
+
Health
@@ -3969,7 +3969,7 @@ sdkServer
-
+
SdkServer
@@ -3982,7 +3982,7 @@ template
-
+
Kubernetes core/v1.PodTemplateSpec
@@ -3995,7 +3995,7 @@ players
-
+
PlayersSpec
@@ -4010,11 +4010,11 @@ (Appears on: -GameServerSpec) +GameServerSpec)
Health configures health checking on the GameServer
@@ -4073,11 +4073,11 @@(Appears on: -GameServerStatus) +GameServerStatus)
PlayerStatus stores the current player capacity values
@@ -4122,11 +4122,11 @@(Appears on: -GameServerSpec) +GameServerSpec)
PlayersSpec tracks the initial player capacity
@@ -4151,20 +4151,20 @@string
alias)(Appears on: -GameServerPort) +GameServerPort)
PortPolicy is the port policy for the GameServer
-(Appears on: -GameServerSpec) +GameServerSpec)
SdkServer specifies parameters for the Agones SDK Server sidecar container
@@ -4181,7 +4181,7 @@logLevel
-
+
SdkServerLogLevel
@@ -4214,25 +4214,25 @@ string
alias)(Appears on: -SdkServer) +SdkServer)
SdkServerLogLevel is the log level for SDK server (sidecar) logs
Package v1 is the v1 version of the API.
Resource Types: -
GameServerAllocation is the data structure for allocating against a set of @@ -4267,7 +4267,7 @@
metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -4281,7 +4281,7 @@ spec
-
+
GameServerAllocationSpec
@@ -4294,7 +4294,7 @@ multiClusterSetting
-
+
MultiClusterSetting
@@ -4308,7 +4308,7 @@ required
-
+
Kubernetes meta/v1.LabelSelector
@@ -4321,7 +4321,7 @@ preferred
-
+
[]Kubernetes meta/v1.LabelSelector
@@ -4347,7 +4347,7 @@ metadata
-
+
MetaPatch
@@ -4364,7 +4364,7 @@ status
-
+
GameServerAllocationStatus
@@ -4374,11 +4374,11 @@ (Appears on: -GameServerAllocation) +GameServerAllocation)
GameServerAllocationSpec is the spec for a GameServerAllocation
@@ -4395,7 +4395,7 @@multiClusterSetting
-
+
MultiClusterSetting
@@ -4409,7 +4409,7 @@ required
-
+
Kubernetes meta/v1.LabelSelector
@@ -4422,7 +4422,7 @@ preferred
-
+
[]Kubernetes meta/v1.LabelSelector
@@ -4448,7 +4448,7 @@ metadata
-
+
MetaPatch
@@ -4460,20 +4460,20 @@ string
alias)(Appears on: -GameServerAllocationStatus) +GameServerAllocationStatus)
GameServerAllocationState is the Allocation state
-(Appears on: -GameServerAllocation) +GameServerAllocation)
GameServerAllocationStatus is the status for an GameServerAllocation resource
@@ -4490,7 +4490,7 @@state
-
+
GameServerAllocationState
@@ -4513,7 +4513,7 @@ ports
-
+
[]GameServerStatusPort
@@ -4543,11 +4543,11 @@ (Appears on: -GameServerAllocationSpec) +GameServerAllocationSpec)
MetaPatch is the metadata used to patch the GameServer metadata on allocation
@@ -4582,11 +4582,11 @@(Appears on: -GameServerAllocationSpec) +GameServerAllocationSpec)
MultiClusterSetting specifies settings for multi-cluster allocation.
@@ -4613,7 +4613,7 @@policySelector
-
+
Kubernetes meta/v1.LabelSelector
@@ -4624,15 +4624,15 @@
Package v1 is the v1 version of the API.
Resource Types: -
FleetAutoscaler is the data structure for a FleetAutoscaler resource
@@ -4666,7 +4666,7 @@metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -4680,7 +4680,7 @@ spec
-
+
FleetAutoscalerSpec
@@ -4703,7 +4703,7 @@ policy
-
+
FleetAutoscalerPolicy
@@ -4719,7 +4719,7 @@ status
-
+
FleetAutoscalerStatus
@@ -4729,11 +4729,11 @@ (Appears on: -FleetAutoscalerPolicy) +FleetAutoscalerPolicy)
BufferPolicy controls the desired behavior of the buffer policy.
@@ -4793,11 +4793,11 @@(Appears on: -FleetAutoscaleReview) +FleetAutoscaleReview)
FleetAutoscaleRequest defines the request to webhook autoscaler endpoint
@@ -4850,7 +4850,7 @@status
-
+
FleetStatus
@@ -4861,11 +4861,11 @@ (Appears on: -FleetAutoscaleReview) +FleetAutoscaleReview)
FleetAutoscaleResponse defines the response of webhook autoscaler endpoint
@@ -4914,7 +4914,7 @@
FleetAutoscaleReview is passed to the webhook with a populated Request value, @@ -4932,7 +4932,7 @@
request
-
+
FleetAutoscaleRequest
@@ -4944,7 +4944,7 @@ response
-
+
FleetAutoscaleResponse
@@ -4954,11 +4954,11 @@ (Appears on: -FleetAutoscalerSpec) +FleetAutoscalerSpec)
FleetAutoscalerPolicy describes how to scale a fleet
@@ -4975,7 +4975,7 @@type
-
+
FleetAutoscalerPolicyType
@@ -4988,7 +4988,7 @@ buffer
-
+
BufferPolicy
@@ -5002,7 +5002,7 @@ webhook
-
+
WebhookPolicy
@@ -5014,21 +5014,21 @@ string
alias)(Appears on: -FleetAutoscalerPolicy) +FleetAutoscalerPolicy)
FleetAutoscalerPolicyType is the policy for autoscaling for a given Fleet
-(Appears on: -FleetAutoscaler) +FleetAutoscaler)
FleetAutoscalerSpec is the spec for a Fleet Scaler
@@ -5055,7 +5055,7 @@policy
-
+
FleetAutoscalerPolicy
@@ -5066,11 +5066,11 @@ (Appears on: -FleetAutoscaler) +FleetAutoscaler)
FleetAutoscalerStatus defines the current status of a FleetAutoscaler
@@ -5111,7 +5111,7 @@lastScaleTime
-
+
Kubernetes meta/v1.Time
@@ -5146,11 +5146,11 @@ (Appears on: -FleetAutoscalerPolicy) +FleetAutoscalerPolicy)
WebhookPolicy controls the desired behavior of the webhook policy. @@ -5200,7 +5200,7 @@
service
-
+
Kubernetes admissionregistration/v1beta1.ServiceReference
@@ -5228,21 +5228,17 @@
Package v1 is the v1 version of the API.
Resource Types: --(Appears on: -ConnectionInfoIterator) -
-
GameServerAllocationPolicy is the Schema for the gameserverallocationpolicies API
metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -5288,7 +5284,7 @@ GameServerAllocationPolicy
spec
-
+
GameServerAllocationPolicySpec
@@ -5321,7 +5317,7 @@ GameServerAllocationPolicy
connectionInfo
-
+
ClusterConnectionInfo
@@ -5334,11 +5330,11 @@ GameServerAllocationPolicy |
(Appears on: -GameServerAllocationPolicySpec) +GameServerAllocationPolicySpec)
ClusterConnectionInfo defines the connection information for a cluster
@@ -5410,7 +5406,7 @@
ConnectionInfoIterator an iterator on ClusterConnectionInfo
@@ -5449,9 +5445,7 @@priorityToCluster
-
map[int32]map[string][]*agones.dev/agones/pkg/apis/multicluster/v1.GameServerAllocationPolicy
-
(Appears on: -GameServerAllocationPolicy) +GameServerAllocationPolicy)
GameServerAllocationPolicySpec defines the desired state of GameServerAllocationPolicy
@@ -5512,7 +5506,7 @@connectionInfo
-
+
ClusterConnectionInfo
diff --git a/site/content/en/docs/Tutorials/allocator-service-go.md b/site/content/en/docs/Tutorials/allocator-service-go.md
index 9ff873681e..cb04c6f7af 100644
--- a/site/content/en/docs/Tutorials/allocator-service-go.md
+++ b/site/content/en/docs/Tutorials/allocator-service-go.md
@@ -55,7 +55,7 @@ containers:
### 2. Create Firewall Rules
-Let's making some [firewall](https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/) rules that will be used by kubernetes health checks and the ingress which we will create shortly.
+Let's making some firewall rules that will be used by kubernetes health checks and the ingress which we will create shortly.
First, we will make one for the HTTPS health checks that will be sent to our service by running:
```
diff --git a/site/gen-api-docs.sh b/site/gen-api-docs.sh
index 6efb8b530d..44154767a3 100755
--- a/site/gen-api-docs.sh
+++ b/site/gen-api-docs.sh
@@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+set -ex
+
export GOPROXY=http://proxy.golang.org
echo "using go proxy as a workaround for git.agache.org being down: $GOPROXY"
@@ -39,7 +41,7 @@ RESULT="/tmp/agones_crd_api_reference.html"
# Version to compare
OLD="/tmp/old_docs.html"
-./gen-crd-api-reference-docs --config ./example-config.json --api-dir ../../../agones.dev/agones/pkg/apis/ --out-file $RESULT
+./gen-crd-api-reference-docs --config ../../../agones.dev/agones/site/assets/templates/crd-doc-config.json --api-dir ../../../agones.dev/agones/pkg/apis/ --out-file $RESULT
awk '/\ feature\ publishVersion/{flag=1;next}/\ \/feature/{flag=0}flag' $FILE > $OLD
# Get the title lines from +++ till empty string
@@ -60,7 +62,7 @@ function sedeasy {
}
# do we have changes in generated API docs compared to previous version
-diff $RESULT $OLD
+diff $RESULT $OLD || true
if [ $? -gt 0 ]
then
echo "Output to a file $FILE"
diff --git a/site/htmltest.yaml b/site/htmltest.yaml
index bdbad128c6..8f398efaa4 100644
--- a/site/htmltest.yaml
+++ b/site/htmltest.yaml
@@ -16,6 +16,7 @@ TestFilesConcurrently: false
IgnoreInternalEmptyHash: true
OutputDir: /go/src/agones.dev/agones/site/tmp
OutputLogFile: .htmltest.log
+CheckExternal: true
ExternalTimeout: 60
IgnoreURLs:
- http://localhost