Skip to content

Commit fb265c8

Browse files
committed
Fixing API Reference Doc Generation
Previously reference docs were converted from godoc to HTML with gen-crd-api-reference-docs and then converted to markdown with mkdocs as part of generating the docs site. This takes out the second step and instead inserts the generated html for the reference docs directly into the generated html for the docs site.
1 parent 0d6d8b5 commit fb265c8

File tree

13 files changed

+9074
-4547
lines changed

13 files changed

+9074
-4547
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ verify:
6969
.PHONY: docs
7070
docs:
7171
# Generate API docs first
72-
./hack/api-docs/generate.sh docs-src/spec.md
72+
./hack/api-docs/generate.sh docs-src/spec.html
7373
# The docs image must be built locally until issue #141 is fixed.
7474
docker build --tag k8s.gcr.io/gateway-api-mkdocs:latest -f mkdocs.dockerfile .
7575
$(MAKE) -f docs.mk

apis/v1alpha1/gateway_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ type GatewaySpec struct {
138138
// validating webhook.
139139
type Listener struct {
140140
// Hostname specifies the virtual hostname to match for protocol types that
141-
// define this concept. When unspecified, "", or "*", all hostnames are
141+
// define this concept. When unspecified, "", or `*`, all hostnames are
142142
// matched. This field can be omitted for protocols that don't require
143143
// hostname based matching.
144144
//
@@ -151,8 +151,8 @@ type Listener struct {
151151
//
152152
// Hostname can be "precise" which is a domain name without the terminating
153153
// dot of a network host (e.g. "foo.example.com") or "wildcard", which is a
154-
// domain name prefixed with a single wildcard label (e.g. "*.example.com").
155-
// The wildcard character '*' must appear by itself as the first DNS label
154+
// domain name prefixed with a single wildcard label (e.g. `*.example.com`).
155+
// The wildcard character `*` must appear by itself as the first DNS label
156156
// and matches only a single label.
157157
//
158158
// Support: Core
@@ -718,7 +718,7 @@ const (
718718

719719
// ListenerReasonHostnameConflict is used when the Listener conflicts with
720720
// hostnames in other Listeners. For example, this reason would be used when
721-
// multiple Listeners on the same port use "*" in the hostname field.
721+
// multiple Listeners on the same port use `*` in the hostname field.
722722
ListenerReasonHostnameConflict ListenerConditionReason = "HostnameConflict"
723723

724724
// ListenerReasonProtocolConflict is used when multiple

apis/v1alpha1/httproute_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ type HTTPRouteSpec struct {
6969
//
7070
// Hostname can be "precise" which is a domain name without the terminating
7171
// dot of a network host (e.g. "foo.example.com") or "wildcard", which is
72-
// a domain name prefixed with a single wildcard label (e.g. "*.example.com").
73-
// The wildcard character '*' must appear by itself as the first DNS
72+
// a domain name prefixed with a single wildcard label (e.g. `*.example.com`).
73+
// The wildcard character `*` must appear by itself as the first DNS
7474
// label and matches only a single label.
75-
// You cannot have a wildcard label by itself (e.g. Host == "*").
75+
// You cannot have a wildcard label by itself (e.g. Host == `*`).
7676
// Requests will be matched against the Host field in the following order:
7777
// 1. If Host is precise, the request matches this rule if
7878
// the http host header is equal to Host.

apis/v1alpha1/tlsroute_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ type TLSRouteMatch struct {
8989
//
9090
// SNI can be "precise" which is a domain name without the terminating
9191
// dot of a network host (e.g. "foo.example.com") or "wildcard", which is
92-
// a domain name prefixed with a single wildcard label (e.g. "*.example.com").
93-
// The wildcard character '*' must appear by itself as the first DNS label
92+
// a domain name prefixed with a single wildcard label (e.g. `*.example.com`).
93+
// The wildcard character `*` must appear by itself as the first DNS label
9494
// and matches only a single label. You cannot have a wildcard label by
95-
// itself (e.g. Host == "*").
95+
// itself (e.g. Host == `*`).
9696
//
9797
// Requests will be matched against the Host field in the following order:
9898
//

config/crd/bases/networking.x-k8s.io_gateways.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/networking.x-k8s.io_httproutes.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/networking.x-k8s.io_tlsroutes.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)