From e4895323b5ea5911e3451c18de7fa321a0dddb0a 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 ++-- 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 ++-- pkg/skaffold/runner/{v3 => v2}/generate_pipeline.go | 4 ++-- pkg/skaffold/runner/{v3 => v2}/render.go | 4 ++-- pkg/skaffold/runner/{v3 => v2}/runner.go | 2 +- 8 files changed, 15 insertions(+), 15 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/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"