mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
cmd/k8s-operator,k8s-operator,go.{mod,sum},tstest/tools: add Tailscale Kubernetes operator API docs (#11246)
Add logic to autogenerate CRD docs. .github/workflows/kubemanifests.yaml CI workflow will fail if the doc is out of date with regard to the current CRDs. Docs can be refreshed by running make kube-generate-all. Updates tailscale/tailscale#11023 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
This commit is contained in:
parent
05acf76392
commit
45d27fafd6
@ -47,9 +47,12 @@
|
|||||||
// Generate static manifests for deploying Tailscale operator on Kubernetes from the operator's Helm chart.
|
// Generate static manifests for deploying Tailscale operator on Kubernetes from the operator's Helm chart.
|
||||||
//go:generate go run tailscale.com/cmd/k8s-operator/generate staticmanifests
|
//go:generate go run tailscale.com/cmd/k8s-operator/generate staticmanifests
|
||||||
|
|
||||||
// Generate Connector CustomResourceDefinition yaml from its Go types.
|
// Generate Connector and ProxyClass CustomResourceDefinition yamls from their Go types.
|
||||||
//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen crd schemapatch:manifests=./deploy/crds output:dir=./deploy/crds paths=../../k8s-operator/apis/...
|
//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen crd schemapatch:manifests=./deploy/crds output:dir=./deploy/crds paths=../../k8s-operator/apis/...
|
||||||
|
|
||||||
|
// Generate CRD docs from the yamls
|
||||||
|
//go:generate go run fybrik.io/crdoc --resources=./deploy/crds --output=../../k8s-operator/api.md
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Required to use our client API. We're fine with the instability since the
|
// Required to use our client API. We're fine with the instability since the
|
||||||
// client lives in the same repo as this code.
|
// client lives in the same repo as this code.
|
||||||
|
1
go.mod
1
go.mod
@ -4,6 +4,7 @@ go 1.22.0
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
filippo.io/mkcert v1.4.4
|
filippo.io/mkcert v1.4.4
|
||||||
|
fybrik.io/crdoc v0.6.3
|
||||||
github.com/akutz/memconn v0.1.0
|
github.com/akutz/memconn v0.1.0
|
||||||
github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa
|
github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa
|
||||||
github.com/andybalholm/brotli v1.1.0
|
github.com/andybalholm/brotli v1.1.0
|
||||||
|
2
go.sum
2
go.sum
@ -46,6 +46,8 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
|||||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||||
filippo.io/mkcert v1.4.4 h1:8eVbbwfVlaqUM7OwuftKc2nuYOoTDQWqsoXmzoXZdbc=
|
filippo.io/mkcert v1.4.4 h1:8eVbbwfVlaqUM7OwuftKc2nuYOoTDQWqsoXmzoXZdbc=
|
||||||
filippo.io/mkcert v1.4.4/go.mod h1:VyvOchVuAye3BoUsPUOOofKygVwLV2KQMVFJNRq+1dA=
|
filippo.io/mkcert v1.4.4/go.mod h1:VyvOchVuAye3BoUsPUOOofKygVwLV2KQMVFJNRq+1dA=
|
||||||
|
fybrik.io/crdoc v0.6.3 h1:jNNAVINu8up5vrLa0jrV7z7HSlyHF/6lNOrAtrXwYlI=
|
||||||
|
fybrik.io/crdoc v0.6.3/go.mod h1:kvZRt7VAzOyrmDpIqREtcKAVFSJYEBoAyniYebsJGtQ=
|
||||||
github.com/Abirdcfly/dupword v0.0.11 h1:z6v8rMETchZXUIuHxYNmlUAuKuB21PeaSymTed16wgU=
|
github.com/Abirdcfly/dupword v0.0.11 h1:z6v8rMETchZXUIuHxYNmlUAuKuB21PeaSymTed16wgU=
|
||||||
github.com/Abirdcfly/dupword v0.0.11/go.mod h1:wH8mVGuf3CP5fsBTkfWwwwKTjDnVVCxtU8d8rgeVYXA=
|
github.com/Abirdcfly/dupword v0.0.11/go.mod h1:wH8mVGuf3CP5fsBTkfWwwwKTjDnVVCxtU8d8rgeVYXA=
|
||||||
github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w=
|
github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w=
|
||||||
|
1644
k8s-operator/api.md
Normal file
1644
k8s-operator/api.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,7 @@
|
|||||||
package tools
|
package tools
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
_ "fybrik.io/crdoc"
|
||||||
_ "github.com/tailscale/mkctr"
|
_ "github.com/tailscale/mkctr"
|
||||||
_ "honnef.co/go/tools/cmd/staticcheck"
|
_ "honnef.co/go/tools/cmd/staticcheck"
|
||||||
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
|
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
|
||||||
|
Loading…
Reference in New Issue
Block a user