From 819c9b41fd73d70e6e1835964fdbaada41155a2d Mon Sep 17 00:00:00 2001 From: Aniruddha Basak Date: Mon, 16 Jan 2023 12:52:42 +0530 Subject: [PATCH] Add doc that clusterctl generate yaml can use raw template URL Signed-off-by: Aniruddha Basak --- docs/book/src/clusterctl/commands/generate-cluster.md | 11 +++++++++-- docs/book/src/clusterctl/commands/generate-yaml.md | 4 +++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/book/src/clusterctl/commands/generate-cluster.md b/docs/book/src/clusterctl/commands/generate-cluster.md index 061616432828..7640d71f4e41 100644 --- a/docs/book/src/clusterctl/commands/generate-cluster.md +++ b/docs/book/src/clusterctl/commands/generate-cluster.md @@ -69,9 +69,9 @@ clusterctl generate cluster my-cluster --kubernetes-version v1.16.3 \ Also following flags are available `--from-config-map-namespace` (defaults to current namespace) and `--from-config-map-key` (defaults to `template`). -#### GitHub, local file system folder or standard input +#### GitHub, raw template URL, local file system folder or standard input -Use the `--from` flag to read cluster templates stored in a GitHub repository, in a local file system folder, +Use the `--from` flag to read cluster templates stored in a GitHub repository, raw template URL, in a local file system folder, or from the standard input; e.g. ```bash @@ -81,6 +81,13 @@ clusterctl generate cluster my-cluster --kubernetes-version v1.16.3 \ or +```bash +clusterctl generate cluster my-cluster --kubernetes-version v1.16.3 \ + --from https://foo.bar/my-template.yaml > my-cluster.yaml +``` + +or + ```bash clusterctl generate cluster my-cluster --kubernetes-version v1.16.3 \ --from ~/my-template.yaml > my-cluster.yaml diff --git a/docs/book/src/clusterctl/commands/generate-yaml.md b/docs/book/src/clusterctl/commands/generate-yaml.md index a30b251e44bd..449e084ef579 100644 --- a/docs/book/src/clusterctl/commands/generate-yaml.md +++ b/docs/book/src/clusterctl/commands/generate-yaml.md @@ -20,9 +20,11 @@ from environment variables. Current usage of the command is as follows: ```bash # Generates a configuration file with variable values using a template from a -# specific URL. +# specific URL as well as a GitHub URL. clusterctl generate yaml --from https://github.com/foo-org/foo-repository/blob/main/cluster-template.yaml +clusterctl generate yaml --from https://foo.bar/cluster-template.yaml + # Generates a configuration file with variable values using # a template stored locally. clusterctl generate yaml --from ~/workspace/cluster-template.yaml