From fe904f52cc0cdf18b52c10bd8c1ae4cee2da2122 Mon Sep 17 00:00:00 2001 From: Andreas Fritzler Date: Fri, 5 Jul 2024 11:31:43 +0200 Subject: [PATCH] Add API reference docs generation --- .github/workflows/check-codegen.yml | 4 +- Makefile | 11 + api/v1alpha1/doc.go | 7 + api/v1alpha1/zz_generated.deepcopy.go | 2 +- docs/api-reference/api.md | 1764 +++++++++++++++++++++++ hack/api-reference/config.json | 32 + hack/api-reference/template/members.tpl | 48 + hack/api-reference/template/pkg.tpl | 48 + hack/api-reference/template/type.tpl | 81 ++ 9 files changed, 1995 insertions(+), 2 deletions(-) create mode 100644 api/v1alpha1/doc.go create mode 100644 docs/api-reference/api.md create mode 100644 hack/api-reference/config.json create mode 100644 hack/api-reference/template/members.tpl create mode 100644 hack/api-reference/template/pkg.tpl create mode 100644 hack/api-reference/template/type.tpl diff --git a/.github/workflows/check-codegen.yml b/.github/workflows/check-codegen.yml index feeeeab..7d97534 100644 --- a/.github/workflows/check-codegen.yml +++ b/.github/workflows/check-codegen.yml @@ -16,10 +16,12 @@ jobs: go-version-file: 'go.mod' - name: Run make generate run: make generate + - name: Run make docs + run: make docs - name: Compare the expected and actual generated/* directories run: | if [ "$(git diff --ignore-space-at-eol client-go/ | wc -l)" -gt "0" ]; then - echo "Detected uncommitted changes after build. Consider running 'make generate'." + echo "Detected uncommitted changes after build. Consider running 'make generate && make docs'." echo "See status below:" git diff exit 1 diff --git a/Makefile b/Makefile index 3053156..9d39785 100644 --- a/Makefile +++ b/Makefile @@ -101,6 +101,10 @@ lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes ##@ Build +.PHONY: docs +docs: gen-crd-api-reference-docs ## Run go generate to generate API reference documentation. + $(GEN_CRD_API_REFERENCE_DOCS) -api-dir ./api/v1alpha1 -config ./hack/api-reference/config.json -template-dir ./hack/api-reference/template -out-file ./docs/api-reference/api.md + .PHONY: build build: manifests generate fmt vet ## Build manager binary. go build -o bin/manager cmd/manager/main.go @@ -184,6 +188,7 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen-$(CONTROLLER_TOOLS_VERSION) ENVTEST ?= $(LOCALBIN)/setup-envtest-$(ENVTEST_VERSION) GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION) GOIMPORTS ?= $(LOCALBIN)/goimports-$(GOIMPORTS_VERSION) +GEN_CRD_API_REFERENCE_DOCS ?= $(LOCALBIN)/gen-crd-api-reference-docs-$(GEN_CRD_API_REFERENCE_DOCS_VERSION) ## Tool Versions KUSTOMIZE_VERSION ?= v5.3.0 @@ -191,6 +196,7 @@ CONTROLLER_TOOLS_VERSION ?= v0.15.0 ENVTEST_VERSION ?= latest GOLANGCI_LINT_VERSION ?= v1.59.1 GOIMPORTS_VERSION ?= v0.22.0 +GEN_CRD_API_REFERENCE_DOCS_VERSION ?= v0.3.0 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. @@ -217,6 +223,11 @@ goimports: $(GOIMPORTS) ## Download goimports locally if necessary. $(GOIMPORTS): $(LOCALBIN) $(call go-install-tool,$(GOIMPORTS),golang.org/x/tools/cmd/goimports,$(GOIMPORTS_VERSION)) +.PHONY: gen-crd-api-reference-docs +gen-crd-api-reference-docs: $(GEN_CRD_API_REFERENCE_DOCS) ## Download gen-crd-api-reference-docs locally if necessary. +$(GEN_CRD_API_REFERENCE_DOCS): $(LOCALBIN) + $(call go-install-tool,$(GEN_CRD_API_REFERENCE_DOCS),github.com/ahmetb/gen-crd-api-reference-docs,$(GEN_CRD_API_REFERENCE_DOCS_VERSION)) + # go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist # $1 - target path with name of binary (ideally with version) # $2 - package url which can be installed diff --git a/api/v1alpha1/doc.go b/api/v1alpha1/doc.go new file mode 100644 index 0000000..91165b2 --- /dev/null +++ b/api/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and IronCore contributors +// SPDX-License-Identifier: Apache-2.0 + +// Package v1alpha1 contains API Schema definitions for the settings.gardener.cloud API group +// +groupName=metal.ironcore.dev +// +kubebuilder:object:generate=true +package v1alpha1 diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 700ac27..efe6540 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -9,7 +9,7 @@ package v1alpha1 import ( corev1 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/docs/api-reference/api.md b/docs/api-reference/api.md new file mode 100644 index 0000000..9dd39eb --- /dev/null +++ b/docs/api-reference/api.md @@ -0,0 +1,1764 @@ +

Packages:

+ +

metal.ironcore.dev/v1alpha1

+
+

Package v1alpha1 contains API Schema definitions for the settings.gardener.cloud API group

+
+Resource Types: + +

BMC +

+
+

BMC is the Schema for the bmcs API

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +BMCSpec + + +
+
+
+ + + + + + + + + + + + + + + + + +
+endpointRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+bmcSecretRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+protocol
+ + +Protocol + + +
+
+consoleProtocol
+ + +ConsoleProtocol + + +
+(Optional) +
+
+status
+ + +BMCStatus + + +
+
+

BMCAccess +

+

+(Appears on:ServerSpec) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+protocol
+ + +Protocol + + +
+
+endpoint
+ +string + +
+
+bmcSecretRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+

BMCPowerState +(string alias)

+

+(Appears on:BMCStatus) +

+
+
+ + + + + + + + + + + + + + + + + + +
ValueDescription

"Off"

OffPowerState the system is powered off, although some components may +continue to have AUX power such as management controller.

+

"On"

OnPowerState the system is powered on.

+

"Paused"

PausedPowerState the system is paused.

+

"PoweringOff"

PoweringOffPowerState A temporary state between On and Off. The power +off action can take time while the OS is in the shutdown process.

+

"PoweringOn"

PoweringOnPowerState A temporary state between Off and On. This +temporary state can be very short.

+
+

BMCSecret +

+
+

BMCSecret is the Schema for the bmcsecrets API

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +

Standard object’s metadata. +More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+immutable
+ +bool + +
+(Optional) +

Immutable, if set to true, ensures that data stored in the Secret cannot +be updated (only object metadata can be modified). +If not set to true, the field can be modified at any time. +Defaulted to nil.

+
+data
+ +map[string][]byte + +
+(Optional) +

Data contains the secret data. Each key must consist of alphanumeric +characters, ‘-’, ‘_’ or ‘.’. The serialized form of the secret data is a +base64 encoded string, representing the arbitrary (possibly non-string) +data value here. Described in https://tools.ietf.org/html/rfc4648#section-4

+
+stringData
+ +map[string]string + +
+(Optional) +

stringData allows specifying non-binary secret data in string form. +It is provided as a write-only input field for convenience. +All keys and values are merged into the data field on write, overwriting any existing values. +The stringData field is never output when reading from the API.

+
+type
+ + +Kubernetes core/v1.SecretType + + +
+(Optional) +

Used to facilitate programmatic handling of secret data. +More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types

+
+

BMCSpec +

+

+(Appears on:BMC) +

+
+

BMCSpec defines the desired state of BMC

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+endpointRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+bmcSecretRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+protocol
+ + +Protocol + + +
+
+consoleProtocol
+ + +ConsoleProtocol + + +
+(Optional) +
+

BMCState +(string alias)

+

+(Appears on:BMCStatus) +

+
+
+ + + + + + + + + + + + +
ValueDescription

"Enabled"

"Error"

+

BMCStatus +

+

+(Appears on:BMC) +

+
+

BMCStatus defines the observed state of BMC

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+macAddress
+ +string + +
+
+ip
+ + +IP + + +
+
+manufacturer
+ +string + +
+
+model
+ +string + +
+
+sku
+ +string + +
+
+serialNumber
+ +string + +
+
+firmwareVersion
+ +string + +
+
+state
+ + +BMCState + + +
+
+powerState
+ + +BMCPowerState + + +
+
+conditions
+ + +[]Kubernetes meta/v1.Condition + + +
+(Optional) +
+

ConsoleProtocol +

+

+(Appears on:BMCSpec) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ + +ConsoleProtocolName + + +
+
+port
+ +int32 + +
+
+

ConsoleProtocolName +(string alias)

+

+(Appears on:ConsoleProtocol) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"IPMI"

"SSH"

"SSHLenovo"

+

Endpoint +

+
+

Endpoint is the Schema for the endpoints API

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

MACAddress is the MAC address of the endpoint.

+
+ip
+ + +IP + + +
+

IP is the IP address of the endpoint.

+
+
+status
+ + +EndpointStatus + + +
+
+

EndpointSpec +

+

+(Appears on:Endpoint) +

+
+

EndpointSpec defines the desired state of Endpoint

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+macAddress
+ +string + +
+

MACAddress is the MAC address of the endpoint.

+
+ip
+ + +IP + + +
+

IP is the IP address of the endpoint.

+
+

EndpointStatus +

+

+(Appears on:Endpoint) +

+
+

EndpointStatus defines the observed state of Endpoint

+
+

IP +

+

+(Appears on:BMCStatus, EndpointSpec, NetworkInterface) +

+
+

IP is an IP address.

+
+ + + + + + + + + + + + + +
FieldDescription
+-
+ + +net/netip.Addr + + +
+
+

IPPrefix +

+
+

IPPrefix represents a network prefix.

+
+ + + + + + + + + + + + + +
FieldDescription
+-
+ + +net/netip.Prefix + + +
+
+

IndicatorLED +(string alias)

+

+(Appears on:ServerSpec, ServerStatus) +

+
+

IndicatorLED represents LED indicator states

+
+ + + + + + + + + + + + + + + + +
ValueDescription

"Blinking"

BlinkingIndicatorLED indicates the Indicator LED is blinking.

+

"Lit"

LitIndicatorLED indicates the Indicator LED is lit.

+

"Off"

OffIndicatorLED indicates the Indicator LED is off.

+

"Unknown"

UnknownIndicatorLED indicates the state of the Indicator LED cannot be +determined.

+
+

NetworkInterface +

+

+(Appears on:ServerStatus) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+
+ip
+ + +IP + + +
+
+macAddress
+ +string + +
+
+

Phase +(string alias)

+

+(Appears on:ServerClaimStatus) +

+
+
+ + + + + + + + + + + + +
ValueDescription

"Bound"

"Unbound"

+

Power +(string alias)

+

+(Appears on:ServerClaimSpec, ServerSpec) +

+
+
+ + + + + + + + + + + + +
ValueDescription

"Off"

"On"

+

Protocol +

+

+(Appears on:BMCAccess, BMCSpec) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ + +ProtocolName + + +
+
+port
+ +int32 + +
+
+

ProtocolName +(string alias)

+

+(Appears on:Protocol) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"IPMI"

"Redfish"

"SSH"

+

Server +

+
+

Server is the Schema for the servers API

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +ServerSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+uuid
+ +string + +
+
+power
+ + +Power + + +
+
+indicatorLED
+ + +IndicatorLED + + +
+
+serverClaimRef
+ + +Kubernetes core/v1.ObjectReference + + +
+
+bmcRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+bmc
+ + +BMCAccess + + +
+
+bootConfigurationRef
+ + +Kubernetes core/v1.ObjectReference + + +
+
+
+status
+ + +ServerStatus + + +
+
+

ServerBootConfiguration +

+
+

ServerBootConfiguration is the Schema for the serverbootconfigurations API

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +ServerBootConfigurationSpec + + +
+
+
+ + + + + + + + + + + + + +
+serverRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+image
+ +string + +
+
+ignitionSecretRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+
+status
+ + +ServerBootConfigurationStatus + + +
+
+

ServerBootConfigurationSpec +

+

+(Appears on:ServerBootConfiguration) +

+
+

ServerBootConfigurationSpec defines the desired state of ServerBootConfiguration

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+serverRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+image
+ +string + +
+
+ignitionSecretRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+

ServerBootConfigurationState +(string alias)

+

+(Appears on:ServerBootConfigurationStatus) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"Error"

"Pending"

"Ready"

+

ServerBootConfigurationStatus +

+

+(Appears on:ServerBootConfiguration) +

+
+

ServerBootConfigurationStatus defines the observed state of ServerBootConfiguration

+
+ + + + + + + + + + + + + +
FieldDescription
+state
+ + +ServerBootConfigurationState + + +
+
+

ServerClaim +

+
+

ServerClaim is the Schema for the serverclaims API

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +ServerClaimSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+power
+ + +Power + + +
+
+serverRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+serverSelector
+ + +Kubernetes meta/v1.LabelSelector + + +
+
+ignitionSecretRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+image
+ +string + +
+
+
+status
+ + +ServerClaimStatus + + +
+
+

ServerClaimSpec +

+

+(Appears on:ServerClaim) +

+
+

ServerClaimSpec defines the desired state of ServerClaim

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+power
+ + +Power + + +
+
+serverRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+serverSelector
+ + +Kubernetes meta/v1.LabelSelector + + +
+
+ignitionSecretRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+image
+ +string + +
+
+

ServerClaimStatus +

+

+(Appears on:ServerClaim) +

+
+

ServerClaimStatus defines the observed state of ServerClaim

+
+ + + + + + + + + + + + + +
FieldDescription
+phase
+ + +Phase + + +
+
+

ServerPowerState +(string alias)

+

+(Appears on:ServerStatus) +

+
+
+ + + + + + + + + + + + + + + + + + +
ValueDescription

"Off"

ServerOffPowerState the system is powered off, although some components may +continue to have AUX power such as management controller.

+

"On"

ServerOnPowerState the system is powered on.

+

"Paused"

ServerPausedPowerState the system is paused.

+

"PoweringOff"

ServerPoweringOffPowerState A temporary state between On and Off. The power +off action can take time while the OS is in the shutdown process.

+

"PoweringOn"

ServerPoweringOnPowerState A temporary state between Off and On. This +temporary state can be very short.

+
+

ServerSpec +

+

+(Appears on:Server) +

+
+

ServerSpec defines the desired state of Server

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+uuid
+ +string + +
+
+power
+ + +Power + + +
+
+indicatorLED
+ + +IndicatorLED + + +
+
+serverClaimRef
+ + +Kubernetes core/v1.ObjectReference + + +
+
+bmcRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+
+bmc
+ + +BMCAccess + + +
+
+bootConfigurationRef
+ + +Kubernetes core/v1.ObjectReference + + +
+
+

ServerState +(string alias)

+

+(Appears on:ServerStatus) +

+
+
+ + + + + + + + + + + + + + + + +
ValueDescription

"Available"

"Error"

"Initial"

"Reserved"

+

ServerStatus +

+

+(Appears on:Server) +

+
+

ServerStatus defines the observed state of Server

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+manufacturer
+ +string + +
+
+sku
+ +string + +
+
+serialNumber
+ +string + +
+
+powerState
+ + +ServerPowerState + + +
+
+indicatorLED
+ + +IndicatorLED + + +
+
+state
+ + +ServerState + + +
+
+networkInterfaces
+ + +[]NetworkInterface + + +
+
+conditions
+ + +[]Kubernetes meta/v1.Condition + + +
+(Optional) +
+
+

+Generated with gen-crd-api-reference-docs +

diff --git a/hack/api-reference/config.json b/hack/api-reference/config.json new file mode 100644 index 0000000..65d4cf1 --- /dev/null +++ b/hack/api-reference/config.json @@ -0,0 +1,32 @@ +{ + "hideMemberFields": [ + "TypeMeta" + ], + "hideTypePatterns": [ + "ParseError$", + "List$" + ], + "externalPackages": [ + { + "typeMatchPrefix": "^net/netip", + "docsURLTemplate": "https://pkg.go.dev/net/netip#{{.TypeIdentifier}}" + }, + { + "typeMatchPrefix": "^k8s\\.io/apimachinery/pkg/api/resource", + "docsURLTemplate": "https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#{{.TypeIdentifier}}" + }, + { + "typeMatchPrefix": "^k8s\\.io/apimachinery/pkg/types", + "docsURLTemplate": "https://pkg.go.dev/k8s.io/apimachinery/pkg/types#{{.TypeIdentifier}}" + }, + { + "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", + "docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}" + } + ], + "typeDisplayNamePrefixOverrides": { + "k8s.io/api/": "Kubernetes ", + "k8s.io/apimachinery/pkg/apis/": "Kubernetes " + }, + "markdownDisabled": false +} diff --git a/hack/api-reference/template/members.tpl b/hack/api-reference/template/members.tpl new file mode 100644 index 0000000..a529c67 --- /dev/null +++ b/hack/api-reference/template/members.tpl @@ -0,0 +1,48 @@ +{{ define "members" }} + +{{ range .Members }} +{{ if not (hiddenMember .)}} + + + {{ fieldName . }}
+ + {{ if linkForType .Type }} + + {{ typeDisplayName .Type }} + + {{ else }} + {{ typeDisplayName .Type }} + {{ end }} + + + + {{ if fieldEmbedded . }} +

+ (Members of {{ fieldName . }} are embedded into this type.) +

+ {{ end}} + + {{ if isOptionalMember .}} + (Optional) + {{ end }} + + {{ safe (renderComments .CommentLines) }} + + {{ if and (eq (.Type.Name.Name) "ObjectMeta") }} + Refer to the Kubernetes API documentation for the fields of the + metadata field. + {{ end }} + + {{ if or (eq (fieldName .) "spec") }} +
+
+ + {{ template "members" .Type }} +
+ {{ end }} + + +{{ end }} +{{ end }} + +{{ end }} diff --git a/hack/api-reference/template/pkg.tpl b/hack/api-reference/template/pkg.tpl new file mode 100644 index 0000000..14eae29 --- /dev/null +++ b/hack/api-reference/template/pkg.tpl @@ -0,0 +1,48 @@ +{{ define "packages" }} + +{{ with .packages}} +

Packages:

+ +{{ end}} + +{{ range .packages }} +

+ {{- packageDisplayName . -}} +

+ + {{ with (index .GoPackages 0 )}} + {{ with .DocComments }} +
+ {{ safe (renderComments .) }} +
+ {{ end }} + {{ end }} + + Resource Types: + + + {{ range (visibleTypes (sortedTypes .Types))}} + {{ template "type" . }} + {{ end }} +
+{{ end }} + +

+ Generated with gen-crd-api-reference-docs +

+ +{{ end }} diff --git a/hack/api-reference/template/type.tpl b/hack/api-reference/template/type.tpl new file mode 100644 index 0000000..8f0d66b --- /dev/null +++ b/hack/api-reference/template/type.tpl @@ -0,0 +1,81 @@ +{{ define "type" }} + +

+ {{- .Name.Name }} + {{ if eq .Kind "Alias" }}({{.Underlying}} alias){{ end -}} +

+{{ with (typeReferences .) }} +

+ (Appears on: + {{- $prev := "" -}} + {{- range . -}} + {{- if $prev -}}, {{ end -}} + {{- $prev = . -}} + {{ typeDisplayName . }} + {{- end -}} + ) +

+{{ end }} + +
+ {{ safe (renderComments .CommentLines) }} +
+ +{{ with (constantsOfType .) }} + + + + + + + + + {{- range . -}} + + {{- /* + renderComments implicitly creates a

element, so we + add one to the display name as well to make the contents + of the two cells align evenly. + */ -}} +

+ + + {{- end -}} + +
ValueDescription

{{ typeDisplayName . }}

{{ safe (renderComments .CommentLines) }}
+{{ end }} + +{{ if .Members }} + + + + + + + + + {{ if isExportedType . }} + + + + + + + + + {{ end }} + {{ template "members" .}} + +
FieldDescription
+ apiVersion
+ string
+ + {{apiGroup .}} + +
+ kind
+ string +
{{.Name.Name}}
+{{ end }} + +{{ end }}