From c2f08e8b4e70c6ca5f42028def65982aa8a0008b Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Mon, 3 May 2021 23:58:23 -0700 Subject: [PATCH] [V3] (part 1) Change runner/v3 to runner/v2. Update v3 flag to v2 --- cmd/skaffold/app/cmd/flags.go | 4 ++-- docs/content/en/docs/references/cli/_index.md | 20 +++++++++---------- pkg/skaffold/runner/{v3 => v2}/apply.go | 4 ++-- pkg/skaffold/runner/{v3 => v2}/cleanup.go | 4 ++-- pkg/skaffold/runner/{v3 => v2}/deploy.go | 4 ++-- pkg/skaffold/runner/{v3 => v2}/dev.go | 4 ++-- .../runner/{v3 => v2}/generate_pipeline.go | 4 ++-- pkg/skaffold/runner/{v3 => v2}/render.go | 4 ++-- pkg/skaffold/runner/{v3 => v2}/runner.go | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) rename pkg/skaffold/runner/{v3 => v2}/apply.go (90%) rename pkg/skaffold/runner/{v3 => v2}/cleanup.go (90%) rename pkg/skaffold/runner/{v3 => v2}/deploy.go (91%) rename pkg/skaffold/runner/{v3 => v2}/dev.go (91%) rename pkg/skaffold/runner/{v3 => v2}/generate_pipeline.go (92%) rename pkg/skaffold/runner/{v3 => v2}/render.go (91%) rename pkg/skaffold/runner/{v3 => v2}/runner.go (98%) diff --git a/cmd/skaffold/app/cmd/flags.go b/cmd/skaffold/app/cmd/flags.go index c6d07176858..0b9cc0ac55b 100644 --- a/cmd/skaffold/app/cmd/flags.go +++ b/cmd/skaffold/app/cmd/flags.go @@ -528,8 +528,8 @@ var flagRegistry = []Flag{ DefinedOn: []string{"dev", "build", "run", "debug", "deploy"}, }, { - Name: "v3", - Usage: "Next skaffold config (v3). Use kpt to render/hydrate and deploy manifests.", + Name: "v2", + Usage: "Next skaffold config (v2). Use kpt to render/hydrate and deploy manifests.", Value: &opts.Experimental, DefValue: false, FlagAddMethod: "BoolVar", diff --git a/docs/content/en/docs/references/cli/_index.md b/docs/content/en/docs/references/cli/_index.md index 7d7c272ea28..f08e8eb5144 100644 --- a/docs/content/en/docs/references/cli/_index.md +++ b/docs/content/en/docs/references/cli/_index.md @@ -131,7 +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. + --v2=false: Next skaffold config (v2). Use kpt to render/hydrate and deploy manifests. Usage: skaffold apply [options] @@ -153,7 +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_V2` (same as `--v2`) ### skaffold build @@ -442,7 +442,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. + --v2=false: Next skaffold config (v2). 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 @@ -495,7 +495,7 @@ Env vars: * `SKAFFOLD_TAIL` (same as `--tail`) * `SKAFFOLD_TOOT` (same as `--toot`) * `SKAFFOLD_TRIGGER` (same as `--trigger`) -* `SKAFFOLD_V3` (same as `--v3`) +* `SKAFFOLD_V2` (same as `--v2`) * `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`) @@ -591,7 +591,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. + --v2=false: Next skaffold config (v2). 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 @@ -632,7 +632,7 @@ Env vars: * `SKAFFOLD_TAG` (same as `--tag`) * `SKAFFOLD_TAIL` (same as `--tail`) * `SKAFFOLD_TOOT` (same as `--toot`) -* `SKAFFOLD_V3` (same as `--v3`) +* `SKAFFOLD_V2` (same as `--v2`) * `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`) @@ -682,7 +682,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. + --v2=false: Next skaffold config (v2). 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 @@ -735,7 +735,7 @@ Env vars: * `SKAFFOLD_TAIL` (same as `--tail`) * `SKAFFOLD_TOOT` (same as `--toot`) * `SKAFFOLD_TRIGGER` (same as `--trigger`) -* `SKAFFOLD_V3` (same as `--v3`) +* `SKAFFOLD_V2` (same as `--v2`) * `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`) @@ -978,7 +978,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. + --v2=false: Next skaffold config (v2). 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 @@ -1026,7 +1026,7 @@ Env vars: * `SKAFFOLD_TAG` (same as `--tag`) * `SKAFFOLD_TAIL` (same as `--tail`) * `SKAFFOLD_TOOT` (same as `--toot`) -* `SKAFFOLD_V3` (same as `--v3`) +* `SKAFFOLD_V2` (same as `--v2`) * `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/runner/v3/apply.go b/pkg/skaffold/runner/v2/apply.go similarity index 90% rename from pkg/skaffold/runner/v3/apply.go rename to pkg/skaffold/runner/v2/apply.go index e792e080ee7..bf4495817f5 100644 --- a/pkg/skaffold/runner/v3/apply.go +++ b/pkg/skaffold/runner/v2/apply.go @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package v3 +package v2 import ( "context" @@ -22,5 +22,5 @@ import ( ) func (r *SkaffoldRunner) Apply(ctx context.Context, out io.Writer) error { - return fmt.Errorf("not implemented error: SkaffoldRunner(v3).Apply") + return fmt.Errorf("not implemented error: SkaffoldRunner(v2).Apply") } diff --git a/pkg/skaffold/runner/v3/cleanup.go b/pkg/skaffold/runner/v2/cleanup.go similarity index 90% rename from pkg/skaffold/runner/v3/cleanup.go rename to pkg/skaffold/runner/v2/cleanup.go index 1c57954c205..3d23ce6356f 100644 --- a/pkg/skaffold/runner/v3/cleanup.go +++ b/pkg/skaffold/runner/v2/cleanup.go @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package v3 +package v2 import ( "context" @@ -22,5 +22,5 @@ import ( ) func (r *SkaffoldRunner) Cleanup(ctx context.Context, out io.Writer) error { - return fmt.Errorf("not implemented error: SkaffoldRunner(v3).Cleanup") + return fmt.Errorf("not implemented error: SkaffoldRunner(v2).Cleanup") } diff --git a/pkg/skaffold/runner/v3/deploy.go b/pkg/skaffold/runner/v2/deploy.go similarity index 91% rename from pkg/skaffold/runner/v3/deploy.go rename to pkg/skaffold/runner/v2/deploy.go index aed032cb564..29ca80bd326 100644 --- a/pkg/skaffold/runner/v3/deploy.go +++ b/pkg/skaffold/runner/v2/deploy.go @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package v3 +package v2 import ( "context" @@ -24,5 +24,5 @@ import ( ) func (r *SkaffoldRunner) Deploy(ctx context.Context, out io.Writer, artifacts []graph.Artifact) error { - return fmt.Errorf("not implemented error: SkaffoldRunner(v3).Deploy") + return fmt.Errorf("not implemented error: SkaffoldRunner(v2).Deploy") } diff --git a/pkg/skaffold/runner/v3/dev.go b/pkg/skaffold/runner/v2/dev.go similarity index 91% rename from pkg/skaffold/runner/v3/dev.go rename to pkg/skaffold/runner/v2/dev.go index 2a26eb74a4c..d54206f2254 100644 --- a/pkg/skaffold/runner/v3/dev.go +++ b/pkg/skaffold/runner/v2/dev.go @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package v3 +package v2 import ( "context" @@ -24,5 +24,5 @@ import ( ) func (r *SkaffoldRunner) Dev(ctx context.Context, out io.Writer, artifacts []*latest_v1.Artifact) error { - return fmt.Errorf("not implemented error: SkaffoldRunner(v3).Dev") + return fmt.Errorf("not implemented error: SkaffoldRunner(v2).Dev") } diff --git a/pkg/skaffold/runner/v3/generate_pipeline.go b/pkg/skaffold/runner/v2/generate_pipeline.go similarity index 92% rename from pkg/skaffold/runner/v3/generate_pipeline.go rename to pkg/skaffold/runner/v2/generate_pipeline.go index 10b564c80d4..175627d13e0 100644 --- a/pkg/skaffold/runner/v3/generate_pipeline.go +++ b/pkg/skaffold/runner/v2/generate_pipeline.go @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package v3 +package v2 import ( "context" @@ -24,5 +24,5 @@ import ( ) func (r *SkaffoldRunner) GeneratePipeline(ctx context.Context, out io.Writer, configs []*latest_v1.SkaffoldConfig, configPaths []string, fileOut string) error { - return fmt.Errorf("not implemented error: SkaffoldRunner(v3).GeneratePipeline") + return fmt.Errorf("not implemented error: SkaffoldRunner(v2).GeneratePipeline") } diff --git a/pkg/skaffold/runner/v3/render.go b/pkg/skaffold/runner/v2/render.go similarity index 91% rename from pkg/skaffold/runner/v3/render.go rename to pkg/skaffold/runner/v2/render.go index c897d210f93..ffb4503496e 100644 --- a/pkg/skaffold/runner/v3/render.go +++ b/pkg/skaffold/runner/v2/render.go @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package v3 +package v2 import ( "context" @@ -24,5 +24,5 @@ import ( ) func (r *SkaffoldRunner) Render(ctx context.Context, out io.Writer, builds []graph.Artifact, offline bool, filepath string) error { - return fmt.Errorf("not implemented error: SkaffoldRunner(v3).Dev") + return fmt.Errorf("not implemented error: SkaffoldRunner(v2).Dev") } diff --git a/pkg/skaffold/runner/v3/runner.go b/pkg/skaffold/runner/v2/runner.go similarity index 98% rename from pkg/skaffold/runner/v3/runner.go rename to pkg/skaffold/runner/v2/runner.go index 33b97969e62..eaf480be5e3 100644 --- a/pkg/skaffold/runner/v3/runner.go +++ b/pkg/skaffold/runner/v2/runner.go @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package v3 +package v2 import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner"