diff --git a/cmd/skaffold/app/cmd/flags.go b/cmd/skaffold/app/cmd/flags.go index 41321b684df..1e398af9a2c 100644 --- a/cmd/skaffold/app/cmd/flags.go +++ b/cmd/skaffold/app/cmd/flags.go @@ -509,6 +509,15 @@ var flagRegistry = []Flag{ DefinedOn: []string{"debug", "dev", "run"}, IsEnum: true, }, + { + Name: "v3", + Usage: "Next skaffold config (v3). Use kpt to render/hydrate and deploy manifests.", + Value: &opts.Experimental, + DefValue: false, + FlagAddMethod: "BoolVar", + DefinedOn: []string{"apply", "debug", "deploy", "dev", "run"}, + IsEnum: true, + }, } func methodNameByType(v reflect.Value) string { diff --git a/docs/content/en/docs/references/cli/_index.md b/docs/content/en/docs/references/cli/_index.md index 7d415327018..722d2bbf958 100644 --- a/docs/content/en/docs/references/cli/_index.md +++ b/docs/content/en/docs/references/cli/_index.md @@ -131,6 +131,7 @@ Options: --remote-cache-dir='': Specify the location of the git repositories cache (default $HOME/.skaffold/repos) --status-check=true: Wait for deployed resources to stabilize --tail=false: Stream logs from deployed objects + --v3=false: Next skaffold config (v3). Use kpt to render/hydrate and deploy manifests. Usage: skaffold apply [options] @@ -152,6 +153,7 @@ Env vars: * `SKAFFOLD_REMOTE_CACHE_DIR` (same as `--remote-cache-dir`) * `SKAFFOLD_STATUS_CHECK` (same as `--status-check`) * `SKAFFOLD_TAIL` (same as `--tail`) +* `SKAFFOLD_V3` (same as `--v3`) ### skaffold build @@ -435,6 +437,7 @@ Options: --tail=true: Stream logs from deployed objects --toot=false: Emit a terminal beep after the deploy is complete --trigger='notify': How is change detection triggered? (polling, notify, or manual) + --v3=false: Next skaffold config (v3). Use kpt to render/hydrate and deploy manifests. --wait-for-deletions=true: Wait for pending deletions to complete before a deployment --wait-for-deletions-delay=2s: Delay between two checks for pending deletions --wait-for-deletions-max=1m0s: Max duration to wait for pending deletions @@ -486,6 +489,7 @@ Env vars: * `SKAFFOLD_TAIL` (same as `--tail`) * `SKAFFOLD_TOOT` (same as `--toot`) * `SKAFFOLD_TRIGGER` (same as `--trigger`) +* `SKAFFOLD_V3` (same as `--v3`) * `SKAFFOLD_WAIT_FOR_DELETIONS` (same as `--wait-for-deletions`) * `SKAFFOLD_WAIT_FOR_DELETIONS_DELAY` (same as `--wait-for-deletions-delay`) * `SKAFFOLD_WAIT_FOR_DELETIONS_MAX` (same as `--wait-for-deletions-max`) @@ -580,6 +584,7 @@ Options: -t, --tag='': The optional custom tag to use for images which overrides the current Tagger configuration --tail=false: Stream logs from deployed objects --toot=false: Emit a terminal beep after the deploy is complete + --v3=false: Next skaffold config (v3). Use kpt to render/hydrate and deploy manifests. --wait-for-deletions=true: Wait for pending deletions to complete before a deployment --wait-for-deletions-delay=2s: Delay between two checks for pending deletions --wait-for-deletions-max=1m0s: Max duration to wait for pending deletions @@ -619,6 +624,7 @@ Env vars: * `SKAFFOLD_TAG` (same as `--tag`) * `SKAFFOLD_TAIL` (same as `--tail`) * `SKAFFOLD_TOOT` (same as `--toot`) +* `SKAFFOLD_V3` (same as `--v3`) * `SKAFFOLD_WAIT_FOR_DELETIONS` (same as `--wait-for-deletions`) * `SKAFFOLD_WAIT_FOR_DELETIONS_DELAY` (same as `--wait-for-deletions-delay`) * `SKAFFOLD_WAIT_FOR_DELETIONS_MAX` (same as `--wait-for-deletions-max`) @@ -667,6 +673,7 @@ Options: --tail=true: Stream logs from deployed objects --toot=false: Emit a terminal beep after the deploy is complete --trigger='notify': How is change detection triggered? (polling, notify, or manual) + --v3=false: Next skaffold config (v3). Use kpt to render/hydrate and deploy manifests. --wait-for-deletions=true: Wait for pending deletions to complete before a deployment --wait-for-deletions-delay=2s: Delay between two checks for pending deletions --wait-for-deletions-max=1m0s: Max duration to wait for pending deletions @@ -718,6 +725,7 @@ Env vars: * `SKAFFOLD_TAIL` (same as `--tail`) * `SKAFFOLD_TOOT` (same as `--toot`) * `SKAFFOLD_TRIGGER` (same as `--trigger`) +* `SKAFFOLD_V3` (same as `--v3`) * `SKAFFOLD_WAIT_FOR_DELETIONS` (same as `--wait-for-deletions`) * `SKAFFOLD_WAIT_FOR_DELETIONS_DELAY` (same as `--wait-for-deletions-delay`) * `SKAFFOLD_WAIT_FOR_DELETIONS_MAX` (same as `--wait-for-deletions-max`) @@ -959,6 +967,7 @@ Options: -t, --tag='': The optional custom tag to use for images which overrides the current Tagger configuration --tail=false: Stream logs from deployed objects --toot=false: Emit a terminal beep after the deploy is complete + --v3=false: Next skaffold config (v3). Use kpt to render/hydrate and deploy manifests. --wait-for-deletions=true: Wait for pending deletions to complete before a deployment --wait-for-deletions-delay=2s: Delay between two checks for pending deletions --wait-for-deletions-max=1m0s: Max duration to wait for pending deletions @@ -1005,6 +1014,7 @@ Env vars: * `SKAFFOLD_TAG` (same as `--tag`) * `SKAFFOLD_TAIL` (same as `--tail`) * `SKAFFOLD_TOOT` (same as `--toot`) +* `SKAFFOLD_V3` (same as `--v3`) * `SKAFFOLD_WAIT_FOR_DELETIONS` (same as `--wait-for-deletions`) * `SKAFFOLD_WAIT_FOR_DELETIONS_DELAY` (same as `--wait-for-deletions-delay`) * `SKAFFOLD_WAIT_FOR_DELETIONS_MAX` (same as `--wait-for-deletions-max`) diff --git a/pkg/skaffold/config/options.go b/pkg/skaffold/config/options.go index af5098c0a8f..4e864497ef2 100644 --- a/pkg/skaffold/config/options.go +++ b/pkg/skaffold/config/options.go @@ -66,6 +66,8 @@ type SkaffoldOptions struct { // label isn't available. AddSkaffoldLabels bool DetectMinikube bool + // Experimental is the entrypoint to run skaffold v3 before it's fully implemented. + Experimental bool PortForward PortForwardOptions CustomTag string