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 404 in CRD generated documentation. #1621

Merged
merged 1 commit into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion build/build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ resources/
node_modules/
tech-doc-hugo
*.json
!/assets/templates/crd-doc-config.json
28 changes: 28 additions & 0 deletions site/assets/templates/crd-doc-config.json
Original file line number Diff line number Diff line change
@@ -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
}
16 changes: 9 additions & 7 deletions site/assets/templates/pkg.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,31 @@
<ul>
{{ range . }}
<li>
<a href="#{{- packageDisplayName . -}}">{{ packageDisplayName . }}</a>
<a href="#{{- packageAnchorID . -}}">{{ packageDisplayName . }}</a>
</li>
{{ end }}
</ul>
{{ end}}

{{ range .packages }}
<h2 id="{{- packageDisplayName . -}}">
<h2 id="{{- packageAnchorID . -}}">
{{- packageDisplayName . -}}
</h2>

{{ with .DocComments }}
<p>
{{ safe (renderComments .) }}
</p>
{{ with (index .GoPackages 0 )}}
{{ with .DocComments }}
<p>
{{ safe (renderComments .) }}
</p>
{{ end }}
{{ end }}

Resource Types:
<ul>
{{- range (visibleTypes (sortedTypes .Types)) -}}
{{ if isExportedType . -}}
<li>
<a href="#{{ typeIdentifier . }}">{{ typeIdentifier . }}</a>
<a href="{{ linkForType . }}">{{ typeDisplayName . }}</a>
</li>
{{- end }}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/docs/Advanced/limiting-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Kubernetes documentation for more details on "requests" and "limits" to both CPU

## GameServers

Since the `GameServer` specification provides a full [`PodSpecTemplate`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#podtemplatespec-v1-core),
Since the `GameServer` specification provides a full [`PodSpecTemplate`](https://v1-15.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.15/#podtemplatespec-v1-core),
we can take advantage of both resource limits and requests in our `GameServer` configurations.

For example, to set a CPU limit on our `GameServer` configuration of `250m/0.25` of a CPU,
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/docs/Guides/Client SDKs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ If `GameServer.Status.Players.IDs` is set manually through the Kubernetes API, u
or SDK.WatchGameServer() instead to list the connected players.
{{< /alert >}}

[playerstatus]: {{< ref "/docs/Reference/agones_crd_api_reference.html#PlayerStatus" >}}
[playerstatus]: {{< ref "/docs/Reference/agones_crd_api_reference.html#agones.dev/v1.PlayerStatus" >}}

## Writing your own SDK

Expand Down
2 changes: 1 addition & 1 deletion site/content/en/docs/Guides/Client SDKs/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,4 @@ Response:
{"list":["uzh7i","3zh7i"]}
```

[playerstatus]: {{< ref "/docs/Reference/agones_crd_api_reference.html#PlayerStatus" >}}
[playerstatus]: {{< ref "/docs/Reference/agones_crd_api_reference.html#agones.dev/v1.PlayerStatus" >}}
Loading