From d32eec1b897904c16d014f6f1fa56ed6fc968b2d Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Thu, 18 Jun 2020 04:08:28 -0700 Subject: [PATCH] [Docs] add an example for global config (#4341) * add an example for global config * fix tests --- docs/content/en/docs/design/global-config.md | 3 +++ docs/content/en/samples/config/globalConfig.yaml | 3 +++ pkg/skaffold/schema/samples_test.go | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 docs/content/en/samples/config/globalConfig.yaml diff --git a/docs/content/en/docs/design/global-config.md b/docs/content/en/docs/design/global-config.md index 402c87ffd95..e5b6291db88 100644 --- a/docs/content/en/docs/design/global-config.md +++ b/docs/content/en/docs/design/global-config.md @@ -21,3 +21,6 @@ For example, to treat any context as local by default: ```bash skaffold config set --global local-cluster true ``` +This will create a global configuration file at `~/.skaffold/config` with `local-cluster` set to `true`. + +{{% readfile file="samples/config/globalConfig.yaml" %}} diff --git a/docs/content/en/samples/config/globalConfig.yaml b/docs/content/en/samples/config/globalConfig.yaml new file mode 100644 index 00000000000..39bed01ad92 --- /dev/null +++ b/docs/content/en/samples/config/globalConfig.yaml @@ -0,0 +1,3 @@ +global: + local-cluster: true +kubeContexts: [] \ No newline at end of file diff --git a/pkg/skaffold/schema/samples_test.go b/pkg/skaffold/schema/samples_test.go index 690c69bfe69..f050718da5b 100644 --- a/pkg/skaffold/schema/samples_test.go +++ b/pkg/skaffold/schema/samples_test.go @@ -36,7 +36,7 @@ const ( ) var ( - ignoredSamples = []string{"structureTest.yaml", "build.sh"} + ignoredSamples = []string{"structureTest.yaml", "build.sh", "globalConfig.yaml"} ) // Test that every example can be parsed and produces a valid