Skip to content

Commit

Permalink
[V3] Add flag as v3 entrypoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenma committed Apr 16, 2021
1 parent 4e67ac7 commit 9e445ee
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
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,
},
{
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

0 comments on commit 9e445ee

Please sign in to comment.