Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V3] Add flag as v3 entrypoint. #5694

Merged
merged 1 commit into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cmd/skaffold/app/cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,15 @@ var flagRegistry = []Flag{
DefinedOn: []string{"debug", "dev", "run"},
IsEnum: true,
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this flag hidden for now?

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 {
Expand Down
10 changes: 10 additions & 0 deletions docs/content/en/docs/references/cli/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`)
Expand Down
2 changes: 2 additions & 0 deletions pkg/skaffold/config/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down