From 8f8a85104e051f9322eec63427177894825d214a Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Wed, 6 Jul 2022 09:56:12 +0200 Subject: [PATCH] book: use generated RuntimeSDK schema YAML --- docs/book/Makefile | 13 +++++++++++-- .../experimental-features/runtime-sdk/.gitignore | 2 ++ .../runtime-sdk/implement-lifecycle-hooks.md | 9 ++++++++- netlify.toml | 6 ++++++ 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 docs/book/src/tasks/experimental-features/runtime-sdk/.gitignore diff --git a/docs/book/Makefile b/docs/book/Makefile index 7a8314093b81..afcb67b9ec0a 100644 --- a/docs/book/Makefile +++ b/docs/book/Makefile @@ -38,10 +38,19 @@ MDBOOK := $(TOOLS_BIN_DIR)/mdbook $(MDBOOK): $(CRATE_INSTALL) --git rust-lang/mdBook --tag v0.4.11 --to $(TOOLS_BIN_DIR) --force +RUNTIME_OPENAPI_GEN_BIN := runtime-openapi-gen +RUNTIME_OPENAPI_GEN := $(abspath $(TOOLS_BIN_DIR)/$(RUNTIME_OPENAPI_GEN_BIN)) + +runtimesdk-yaml: + $(MAKE) -C $(ROOT_DIR)/../../ $(RUNTIME_OPENAPI_GEN_BIN) + $(RUNTIME_OPENAPI_GEN) --version book --output-file ./src/tasks/experimental-features/runtime-sdk/runtime-sdk-openapi.yaml + +BOOK_DEPS := runtimesdk-yaml + .PHONY: serve -serve: $(MDBOOK) $(TABULATE) $(EMBED) $(RELEASELINK) +serve: $(MDBOOK) $(TABULATE) $(EMBED) $(RELEASELINK) runtimesdk-yaml $(MDBOOK) serve .PHONY: build -build: $(MDBOOK) $(TABULATE) $(EMBED) $(RELEASELINK) +build: $(MDBOOK) $(TABULATE) $(EMBED) $(RELEASELINK) runtimesdk-yaml $(MDBOOK) build diff --git a/docs/book/src/tasks/experimental-features/runtime-sdk/.gitignore b/docs/book/src/tasks/experimental-features/runtime-sdk/.gitignore new file mode 100644 index 000000000000..1b4dc5bb6397 --- /dev/null +++ b/docs/book/src/tasks/experimental-features/runtime-sdk/.gitignore @@ -0,0 +1,2 @@ +# Generated via make +runtime-sdk-openapi.yaml diff --git a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md index adede3e2db4c..4d736817515d 100644 --- a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md +++ b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md @@ -67,7 +67,7 @@ message: "error message if status == Failure" retryAfterSeconds: 10 ``` -For additional details, refer to the [Draft OpenAPI spec](https://editor.swagger.io/?url=https://raw.githubusercontent.com/kubernetes-sigs/cluster-api/main/docs/proposals/images/runtime-hooks/runtime-hooks-openapi.yaml). +For additional details, you cann see the schema in . (*) The objects which are part of a Cluster topology are the infrastructure Cluster, the Control Plane, the MachineDeployments and the templates derived from the ClusterClass. @@ -253,3 +253,10 @@ retryAfterSeconds: 10 ``` For additional details, refer to the [Draft OpenAPI spec](https://editor.swagger.io/?url=https://raw.githubusercontent.com/kubernetes-sigs/cluster-api/main/docs/proposals/images/runtime-hooks/runtime-hooks-openapi.yaml). + + diff --git a/netlify.toml b/netlify.toml index e021feac791f..66d93c4fd6dd 100644 --- a/netlify.toml +++ b/netlify.toml @@ -25,3 +25,9 @@ to = "http://main.cluster-api.sigs.k8s.io/:splat" status = 301 force = true + +[[headers]] + for = "/*" + [headers.values] + Access-Control-Allow-Origin = "*" + Access-Control-Allow-Methods = "*"