Repository: GoogleContainerTools/skaffold
Pull request #7925 (2022-10-06 22:10:56)

fix: reverse order of deployers during cleanup (#7284)
<!-- Thank you for your contribution! -->

<!-- Include if applicable: -->
Fixes: #7284 <!-- tracking issues that this PR will close -->
**Related**: _Relevant tracking issues, for context_
**Merge before/after**: _Dependent or prerequisite PRs_

**Description**
<!-- Describe your changes here. The more detail, the easier the review! -->
Add a new deployer slice during cleanup function of the DeployerMux which is reversed in it's order. This change should be covered by the existing unittests since no new function was added.

**User facing changes (remove if N/A)**
<!-- Describe any user facing changes this PR introduces. -->
<!-- "Before" and "After" sections work great - bonus points for screenshots! -->
<!-- Be sure all docs have been updated as well! -->
Before:
Modules are undeployed in the same order as they are deployed. Visible in the console as

```shell
^CCleaning up...
release "postgresql" uninstalled
 - deployment.apps "example-django" deleted
INFO[0016] Cleanup completed in 886.10607ms              subtask=-1 task=DevLoop

```

After:
Modules are undeployed in reverse order.

```shell
^CCleaning up...
 - deployment.apps "example-django" deleted
release "postgresql" uninstalled
INFO[0328] Cleanup completed in 1.038 second             subtask=-1 task=DevLoop
```

<!--
Please be sure your PR includes unit tests - we don't merge code that brings down test coverage! 
Integration tests are sometimes an appropriate substitute. 
-->


codecov[bot]: # [Codecov](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools) Report
> Merging [#7925](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools) (a1bbb01) into [main](https://codecov.io/gh/GoogleContainerTools/skaffold/commit/290280e8c6c19231e9ed5b5c027f2c01d22f75be?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools) (290280e) will **decrease** coverage by `3.79%`.
> The diff coverage is `53.94%`.

```diff
@@            Coverage Diff             @@
##             main    #7925      +/-   ##
==========================================
- Coverage   70.48%   66.69%   -3.80%     
==========================================
  Files         515      593      +78     
  Lines       23150    28706    +5556     
==========================================
+ Hits        16317    19145    +2828     
- Misses       5776     8145    +2369     
- Partials     1057     1416     +359     
```


| [Impacted Files](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools) | Coverage Δ | |
|---|---|---|
| [cmd/skaffold/app/cmd/credits/export.go](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools#diff-Y21kL3NrYWZmb2xkL2FwcC9jbWQvY3JlZGl0cy9leHBvcnQuZ28=) | `0.00% <0.00%> (ø)` | |
| [cmd/skaffold/app/cmd/deploy.go](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools#diff-Y21kL3NrYWZmb2xkL2FwcC9jbWQvZGVwbG95Lmdv) | `40.90% <0.00%> (-12.94%)` | :arrow_down: |
| [cmd/skaffold/app/cmd/test.go](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools#diff-Y21kL3NrYWZmb2xkL2FwcC9jbWQvdGVzdC5nbw==) | `44.44% <0.00%> (ø)` | |
| [cmd/skaffold/skaffold.go](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools#diff-Y21kL3NrYWZmb2xkL3NrYWZmb2xkLmdv) | `0.00% <0.00%> (ø)` | |
| [cmd/skaffold/app/cmd/inspect\_tests.go](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools#diff-Y21kL3NrYWZmb2xkL2FwcC9jbWQvaW5zcGVjdF90ZXN0cy5nbw==) | `62.50% <14.28%> (-1.14%)` | :arrow_down: |
| [cmd/skaffold/app/cmd/render.go](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools#diff-Y21kL3NrYWZmb2xkL2FwcC9jbWQvcmVuZGVyLmdv) | `35.48% <18.18%> (-5.90%)` | :arrow_down: |
| [cmd/skaffold/app/cmd/lsp.go](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools#diff-Y21kL3NrYWZmb2xkL2FwcC9jbWQvbHNwLmdv) | `28.12% <28.12%> (ø)` | |
| [cmd/skaffold/app/cmd/run.go](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools#diff-Y21kL3NrYWZmb2xkL2FwcC9jbWQvcnVuLmdv) | `64.28% <33.33%> (-9.63%)` | :arrow_down: |
| [cmd/skaffold/app/cmd/fix.go](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools#diff-Y21kL3NrYWZmb2xkL2FwcC9jbWQvZml4Lmdv) | `56.41% <37.50%> (-20.07%)` | :arrow_down: |
| [cmd/skaffold/app/cmd/verify.go](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools#diff-Y21kL3NrYWZmb2xkL2FwcC9jbWQvdmVyaWZ5Lmdv) | `41.17% <41.17%> (ø)` | |
| ... and [363 more](https://codecov.io/gh/GoogleContainerTools/skaffold/pull/7925/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools) | |

:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleContainerTools)

gsquared94: @chronicc can you sign the cla?

> New Contributors: Update this check after signing the CLA by clicking [here](https://cla.developers.google.com/github/rescan?pr=GoogleContainerTools%2Fskaffold%2Fpull%2F7925&key=%01%D8%8E%A4%B2%94%F5%15%25%C8%F7%05%B0W%9A%2An9D%8A+&expiry=2022-11-26).
chronicc: Sorry for pushing again. I've fixed the linting erros and added a file to the gitignore for asdf.

Patch:
diff --git a/.github/workflows/performance-comparison-label.yml b/.github/workflows/performance-comparison-label.yml
index 29d45d3f4..02c2a08c3 100644
--- a/.github/workflows/performance-comparison-label.yml
+++ b/.github/workflows/performance-comparison-label.yml
@@ -38,7 +38,7 @@ jobs:
         echo ::set-output name=body::$body
     
     - name: Create comment
-      uses: peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32
+      uses: peter-evans/create-or-update-comment@2b2c85d0bf1b8a7b4e7e344bd5c71dc4b9196e9f
       with:
         issue-number: ${{ github.event.pull_request.number }}
         body: "${{ steps.parse-comment-template-into-gh-output.outputs.body }}"
diff --git a/.github/workflows/performance-comparison.yml b/.github/workflows/performance-comparison.yml
index dc52a0907..b0e495064 100644
--- a/.github/workflows/performance-comparison.yml
+++ b/.github/workflows/performance-comparison.yml
@@ -33,7 +33,7 @@ jobs:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 
     - name: Add reaction
-      uses: peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32
+      uses: peter-evans/create-or-update-comment@2b2c85d0bf1b8a7b4e7e344bd5c71dc4b9196e9f
       with:
         comment-id: ${{ github.event.comment.id }}
         reactions: rocket
@@ -123,7 +123,7 @@ jobs:
         echo ::set-output name=body::$body
 
     - name: Create comment
-      uses: peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32
+      uses: peter-evans/create-or-update-comment@2b2c85d0bf1b8a7b4e7e344bd5c71dc4b9196e9f
       with:
         issue-number: ${{ github.event.issue.number }}
         body: "${{ steps.run-performance-comparison-benchmarks.outputs.body }}"
diff --git a/.gitignore b/.gitignore
index 61fff4424..94bedac86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@ integration/testdata/plugin/local/bazel/bazel-*
 *.new
 *.iml
 .idea/
+.tool-versions
 .vscode/
 docs/.firebase
 docs/firebase-debug*
diff --git a/docs-v2/config.toml b/docs-v2/config.toml
index 8299e3764..ebd52e1c4 100644
--- a/docs-v2/config.toml
+++ b/docs-v2/config.toml
@@ -70,7 +70,7 @@ id = "UA-120945544-1"
 [languages]
 [languages.en]
 title = "Skaffold"
-description = "Easy and Repeatable Kubernetes Development"
+description = "Easy and Repeatable Container & Kubernetes Development"
 languageName ="English"
 # Weight used for sorting.
 weight = 1
diff --git a/docs-v2/content/en/_index.html b/docs-v2/content/en/_index.html
index 8c46f5a2e..2666035bd 100644
--- a/docs-v2/content/en/_index.html
+++ b/docs-v2/content/en/_index.html
@@ -14,7 +14,7 @@ linkTitle = "Skaffold"
                         Fast. Repeatable. Simple.
                     </div>
                     <div class="title row" id="fadein">
-                        Local Kubernetes Development.
+                        Container & Kubernetes Development.
                     </div>
                     <div class="row mt-4">
                         <div class="col-sm-8">
@@ -101,7 +101,7 @@ linkTitle = "Skaffold"
         <i class="far fa-gem"></i>
     </div>
     <h4 class="h3 mb-4">Feature Rich</h4>
-    <p class="mb-0 text-left">Skaffold has many essential features for Kubernetes-native development, including
+    <p class="mb-0 text-left">Skaffold has many essential features for container & Kubernetes development, including
         policy-based image tagging, resource port-forwarding and logging, file syncing, and much more.</p>
 </div>
 
diff --git a/docs-v2/content/en/docs/_index.md b/docs-v2/content/en/docs/_index.md
index 6ddbd06f0..79ce29e00 100644
--- a/docs-v2/content/en/docs/_index.md
+++ b/docs-v2/content/en/docs/_index.md
@@ -1,5 +1,5 @@
 ---
-title: "Skaffold Documentation"
+title: "Skaffold 2.0 Documentation"
 linkTitle: "Documentation"
 weight: 20
 menu:
@@ -15,12 +15,12 @@ no_list: true
     </p>
 </div>
 
-Skaffold is a command line tool that facilitates continuous development for
-Kubernetes-native applications. Skaffold handles the workflow for building,
+Skaffold is a command line tool that facilitates continuous development for container based &
+Kubernetes applications. Skaffold handles the workflow for building,
 pushing, and deploying your application, and provides building blocks for
 creating CI/CD pipelines. This enables you to focus on iterating on your
 application locally while Skaffold continuously deploys to your local or remote
-Kubernetes cluster.
+Kubernetes cluster, local Docker environment or Cloud Run project.
 
 ## Features
 
diff --git a/docs-v2/content/en/docs/install/_index.md b/docs-v2/content/en/docs/install/_index.md
index 6b81da096..7878d7524 100644
--- a/docs-v2/content/en/docs/install/_index.md
+++ b/docs-v2/content/en/docs/install/_index.md
@@ -1,6 +1,6 @@
 ---
-title: "Installing Skaffold v2.0.0-beta3 [NEW]"
-linkTitle: "Installing Skaffold v2.0.0-beta3 [NEW]"
+title: "Installing Skaffold v2.0.0 [NEW]"
+linkTitle: "Installing Skaffold v2.0.0 [NEW]"
 weight: 10
 aliases: [/docs/getting-started]
 ---
@@ -10,37 +10,37 @@ aliases: [/docs/getting-started]
 
 {{% tab "LINUX" %}}
 The latest **stable** v2.0.0 beta binaries can be found here:
-- Linux x86_64 (amd64): https://storage.googleapis.com/skaffold/releases/v2.0.0-beta3/skaffold-linux-amd64
-- Linux ARMv8 (arm64): https://storage.googleapis.com/skaffold/releases/v2.0.0-beta3/skaffold-linux-arm64
+- Linux x86_64 (amd64): https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-linux-amd64
+- Linux ARMv8 (arm64): https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-linux-arm64
 
 Simply download the appropriate binary and add it to your `PATH`. Or, copy+paste one of the following commands in your terminal:
 
 ```bash
 # For Linux x86_64 (amd64)
-curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0-beta3/skaffold-linux-amd64 && \
+curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-linux-amd64 && \
 sudo install skaffold /usr/local/bin/
 ```
 
 ```bash
 # For Linux ARMv8 (arm64)
-curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0-beta3/skaffold-linux-arm64 && \
+curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-linux-arm64 && \
 sudo install skaffold /usr/local/bin/
 ```
 
 We also release a v2.0.0 **bleeding edge** latest build, built from the latest commit:
 
-- Linux x86_64 (amd64): https://storage.googleapis.com/skaffold/builds/latest/v2/skaffold-linux-amd64
-- Linux ARMv8 (arm64): https://storage.googleapis.com/skaffold/builds/latest/v2/skaffold-linux-arm64
+- Linux x86_64 (amd64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-amd64
+- Linux ARMv8 (arm64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-arm64
 
 ```bash
 # For Linux on x86_64 (amd64)
-curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/v2.0.0-beta3/skaffold-linux-amd64 && \
+curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/v2.0.0/skaffold-linux-amd64 && \
 sudo install skaffold /usr/local/bin/
 ```
 
 ```bash
 # For Linux on ARMv8 (arm64)
-curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/v2.0.0-beta3/skaffold-linux-arm64 && \
+curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/v2.0.0/skaffold-linux-arm64 && \
 sudo install skaffold /usr/local/bin/
 ```
 
@@ -50,37 +50,37 @@ sudo install skaffold /usr/local/bin/
 
 The latest **stable** binaries can be found here:
 
-- Darwin x86_64 (amd64): https://storage.googleapis.com/skaffold/releases/v2.0.0-beta3/skaffold-darwin-amd64
-- Darwin ARMv8 (arm64): https://storage.googleapis.com/skaffold/releases/v2.0.0-beta3/skaffold-darwin-arm64
+- Darwin x86_64 (amd64): https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-darwin-amd64
+- Darwin ARMv8 (arm64): https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-darwin-arm64
 
 Simply download the appropriate binary and add it to your `PATH`. Or, copy+paste one of the following commands in your terminal:
 
 ```bash
 # For macOS on x86_64 (amd64)
-curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0-beta3/skaffold-darwin-amd64 && \
+curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-darwin-amd64 && \
 sudo install skaffold /usr/local/bin/
 ```
 
 ```bash
 # For macOS on ARMv8 (arm64)
-curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0-beta3/skaffold-darwin-arm64 && \
+curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-darwin-arm64 && \
 sudo install skaffold /usr/local/bin/
 ```
 
 We also release a v2.0.0 **bleeding edge** build, built from the latest commit:
 
-- Darwin x86_64 (amd64): https://storage.googleapis.com/skaffold/builds/latest/v2/skaffold-darwin-amd64
-- Darwin ARMv8 (arm64): https://storage.googleapis.com/skaffold/builds/latest/v2/skaffold-darwin-arm64
+- Darwin x86_64 (amd64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-amd64
+- Darwin ARMv8 (arm64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-arm64
 
 ```bash
 # For macOS on x86_64 (amd64)
-curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/v2/skaffold-darwin-amd64 && \
+curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-amd64 && \
 sudo install skaffold /usr/local/bin/
 ```
 
 ```bash
 # For macOS on ARMv8 (arm64)
-curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/v2/skaffold-darwin-arm64 && \
+curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-arm64 && \
 sudo install skaffold /usr/local/bin/
 ```
 {{% /tab %}}
@@ -90,13 +90,13 @@ sudo install skaffold /usr/local/bin/
 
 The latest **stable** release binary can be found here:
 
-https://storage.googleapis.com/skaffold/releases/v2.0.0-beta3/skaffold-windows-amd64.exe
+https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-windows-amd64.exe
 
 Simply download it and place it in your `PATH` as `skaffold.exe`.
 
 We also release a **bleeding edge** build, built from the latest commit:
 
-https://storage.googleapis.com/skaffold/builds/latest/v2/skaffold-windows-amd64.exe
+https://storage.googleapis.com/skaffold/builds/latest/skaffold-windows-amd64.exe
 {{% /tab %}}
 
 {{% tab "DOCKER" %}}
diff --git a/docs-v2/content/en/docs/pipeline-stages/taggers.md b/docs-v2/content/en/docs/pipeline-stages/taggers.md
index be5cc7c5c..b1cdd90b4 100644
--- a/docs-v2/content/en/docs/pipeline-stages/taggers.md
+++ b/docs-v2/content/en/docs/pipeline-stages/taggers.md
@@ -167,7 +167,7 @@ it will evaluate `FOO` and `BAR` and use their values to tag the image.
 {{< alert >}}
 <b>Note</b><br>
 
-`GIT`, `DATE`, and `SHA` are special built-in component references that will evaluate to the default gitCommit, dateTime, and sha256 taggers, respectively.
+`GIT`, `DATE`, `SHA`, and `INPUT_DIGEST` are special built-in component references that will evaluate to the default gitCommit, dateTime, sha256, and inputDigest taggers, respectively.
 Users can overwrite these values by defining a component with one of these names.
 {{< /alert >}}
 
diff --git a/docs-v2/data/maturity.json b/docs-v2/data/maturity.json
index 5eeb99912..91d099d2a 100644
--- a/docs-v2/data/maturity.json
+++ b/docs-v2/data/maturity.json
@@ -244,12 +244,8 @@
     "description": "User can generate a starter tekton pipeline using skaffold"
   },
   "verify": {
-    "dev": "x",
-    "debug": "x",
-    "run": "x",
-    "deploy": "x",
     "area": "skaffold verify",
-    "maturity": "beta",
+    "maturity": "GA",
     "description": "User can run post deployment tests via skaffold monitored test containers"
   },
   "global_config": {
diff --git a/docs/content/en/docs/pipeline-stages/taggers.md b/docs/content/en/docs/pipeline-stages/taggers.md
index b1cdd90b4..be5cc7c5c 100644
--- a/docs/content/en/docs/pipeline-stages/taggers.md
+++ b/docs/content/en/docs/pipeline-stages/taggers.md
@@ -167,7 +167,7 @@ it will evaluate `FOO` and `BAR` and use their values to tag the image.
 {{< alert >}}
 <b>Note</b><br>
 
-`GIT`, `DATE`, `SHA`, and `INPUT_DIGEST` are special built-in component references that will evaluate to the default gitCommit, dateTime, sha256, and inputDigest taggers, respectively.
+`GIT`, `DATE`, and `SHA` are special built-in component references that will evaluate to the default gitCommit, dateTime, and sha256 taggers, respectively.
 Users can overwrite these values by defining a component with one of these names.
 {{< /alert >}}
 
diff --git a/installers/windows/skaffold.nsi b/installers/windows/skaffold.nsi
index d3abf64b8..24ceff3e6 100644
--- a/installers/windows/skaffold.nsi
+++ b/installers/windows/skaffold.nsi
@@ -3,7 +3,7 @@
 !define WEB_SITE "https://skaffold.dev"
 !define VERSION "$%SKAFFOLD_VERSION%"
 !define COPYRIGHT "Google Skaffold Authors, 2021"
-!define DESCRIPTION "Fast. Repeatable. Simple. Local Kubernetes Development"
+!define DESCRIPTION "Fast. Repeatable. Simple. Container & Kubernetes Development"
 !define INSTALLER_NAME "skaffold_installer.exe"
 !define MAIN_APP_EXE "skaffold.exe"
 !define ICON "..\..\docs\static\favicons\favicon.ico"
diff --git a/pkg/skaffold/deploy/deploy_mux.go b/pkg/skaffold/deploy/deploy_mux.go
index ff1a84a24..580e8c7ac 100644
--- a/pkg/skaffold/deploy/deploy_mux.go
+++ b/pkg/skaffold/deploy/deploy_mux.go
@@ -57,6 +57,14 @@ func (m DeployerMux) GetDeployers() []Deployer {
 	return m.deployers
 }
 
+func (m DeployerMux) GetDeployersInverse() []Deployer {
+	inverse := m.deployers
+	for i, j := 0, len(inverse)-1; i < j; i, j = i+1, j-1 {
+		inverse[i], inverse[j] = inverse[j], inverse[i]
+	}
+	return inverse
+}
+
 func (m DeployerMux) GetAccessor() access.Accessor {
 	var accessors access.AccessorMux
 	for _, deployer := range m.deployers {
@@ -161,7 +169,9 @@ func (m DeployerMux) Dependencies() ([]string, error) {
 }
 
 func (m DeployerMux) Cleanup(ctx context.Context, w io.Writer, dryRun bool, manifestsByConfig manifest.ManifestListByConfig) error {
-	for _, deployer := range m.deployers {
+	// Reverse order of deployers for cleanup to ensure resources
+	// are removed before their definitions are removed.
+	for _, deployer := range m.GetDeployersInverse() {
 		ctx, endTrace := instrumentation.StartTrace(ctx, "Cleanup")
 		if dryRun {
 			output.Yellow.Fprintln(w, "Following resources would be deleted:")
diff --git a/pkg/skaffold/render/generate/generate.go b/pkg/skaffold/render/generate/generate.go
index 37f1801b9..27a739dfb 100644
--- a/pkg/skaffold/render/generate/generate.go
+++ b/pkg/skaffold/render/generate/generate.go
@@ -42,10 +42,11 @@ import (
 )
 
 // NewGenerator instantiates a Generator object.
-func NewGenerator(workingDir string, config latest.Generate) Generator {
+func NewGenerator(workingDir string, config latest.Generate, hydrationDir string) Generator {
 	return Generator{
-		workingDir: workingDir,
-		config:     config,
+		workingDir:   workingDir,
+		config:       config,
+		hydrationDir: hydrationDir,
 	}
 }
 
diff --git a/pkg/skaffold/render/renderer/helm/helm.go b/pkg/skaffold/render/renderer/helm/helm.go
index 9b5e3d833..a0140a89a 100644
--- a/pkg/skaffold/render/renderer/helm/helm.go
+++ b/pkg/skaffold/render/renderer/helm/helm.go
@@ -61,7 +61,7 @@ func (h Helm) Labels() map[string]string { return h.labels }
 func (h Helm) GlobalFlags() []string     { return h.config.Flags.Global }
 
 func New(cfg render.Config, rCfg latest.RenderConfig, labels map[string]string, configName string) (Helm, error) {
-	generator := generate.NewGenerator(cfg.GetWorkingDir(), rCfg.Generate)
+	generator := generate.NewGenerator(cfg.GetWorkingDir(), rCfg.Generate, "")
 	transformAllowlist, transformDenylist, err := util.ConsolidateTransformConfiguration(cfg)
 	if err != nil {
 		return Helm{}, err
diff --git a/pkg/skaffold/render/renderer/kpt/kpt.go b/pkg/skaffold/render/renderer/kpt/kpt.go
index c5b8b0819..d5a186b00 100644
--- a/pkg/skaffold/render/renderer/kpt/kpt.go
+++ b/pkg/skaffold/render/renderer/kpt/kpt.go
@@ -24,6 +24,7 @@ import (
 	"os/exec"
 	"path/filepath"
 
+	"github.com/blang/semver"
 	apimachinery "k8s.io/apimachinery/pkg/runtime/schema"
 
 	sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors"
@@ -62,8 +63,13 @@ const (
 	DryFileName = "manifests.yaml"
 )
 
+var (
+	KptVersion                      = currentKptVersion
+	maxKptVersionAllowedForDeployer = "1.0.0-beta.13"
+)
+
 func New(cfg render.Config, rCfg latest.RenderConfig, hydrationDir string, labels map[string]string, configName string, ns string) (*Kpt, error) {
-	generator := generate.NewGenerator(cfg.GetWorkingDir(), rCfg.Generate)
+	generator := generate.NewGenerator(cfg.GetWorkingDir(), rCfg.Generate, hydrationDir)
 	transformAllowlist, transformDenylist, err := rUtil.ConsolidateTransformConfiguration(cfg)
 	if err != nil {
 		return nil, err
@@ -222,3 +228,32 @@ func (r *Kpt) unwrapManifests(ctx context.Context, out io.Writer) (manifest.Mani
 	manifestListByConfig.Add(r.configName, m)
 	return manifestListByConfig, nil
 }
+
+func CheckIsProperBinVersion(ctx context.Context) error {
+	maxAllowedVersion := semver.MustParse(maxKptVersionAllowedForDeployer)
+	version, err := KptVersion(ctx)
+	if err != nil {
+		return err
+	}
+
+	currentVersion, err := semver.ParseTolerant(version)
+	if err != nil {
+		return err
+	}
+
+	if currentVersion.GT(maxAllowedVersion) {
+		return fmt.Errorf("max allowed verion for Kpt renderer without Kpt deployer is %v, detected version is %v", maxKptVersionAllowedForDeployer, currentVersion)
+	}
+
+	return nil
+}
+
+func currentKptVersion(ctx context.Context) (string, error) {
+	cmd := exec.Command("kpt", "version")
+	b, err := util.RunCmdOut(ctx, cmd)
+	if err != nil {
+		return "", fmt.Errorf("kpt version command failed: %w", err)
+	}
+	version := string(b)
+	return version, nil
+}
diff --git a/pkg/skaffold/render/renderer/kubectl/kubectl.go b/pkg/skaffold/render/renderer/kubectl/kubectl.go
index c7182ed1b..1482cc009 100644
--- a/pkg/skaffold/render/renderer/kubectl/kubectl.go
+++ b/pkg/skaffold/render/renderer/kubectl/kubectl.go
@@ -46,7 +46,7 @@ type Kubectl struct {
 }
 
 func New(cfg render.Config, rCfg latest.RenderConfig, labels map[string]string, configName string, ns string) (Kubectl, error) {
-	generator := generate.NewGenerator(cfg.GetWorkingDir(), rCfg.Generate)
+	generator := generate.NewGenerator(cfg.GetWorkingDir(), rCfg.Generate, "")
 	transformAllowlist, transformDenylist, err := util.ConsolidateTransformConfiguration(cfg)
 	if err != nil {
 		return Kubectl{}, err
diff --git a/pkg/skaffold/render/renderer/renderer.go b/pkg/skaffold/render/renderer/renderer.go
index 6bac7a4db..0338772b0 100644
--- a/pkg/skaffold/render/renderer/renderer.go
+++ b/pkg/skaffold/render/renderer/renderer.go
@@ -40,27 +40,24 @@ type Renderer interface {
 
 // New creates a new Renderer object from the latestV2 API schema.
 func New(ctx context.Context, cfg render.Config, renderCfg latest.RenderConfig, hydrationDir string, labels map[string]string, configName string) (GroupRenderer, error) {
+	var rs GroupRenderer
+	rs.HookRunners = []hooks.Runner{hooks.NewRenderRunner(renderCfg.Generate.LifecycleHooks, &[]string{cfg.GetNamespace()}, hooks.NewRenderEnvOpts(cfg.GetKubeContext(), []string{cfg.GetNamespace()}))}
+
 	if renderCfg.Validate != nil || renderCfg.Transform != nil || renderCfg.Kpt != nil {
 		r, err := kpt.New(cfg, renderCfg, hydrationDir, labels, configName, cfg.GetNamespace())
 		if err != nil {
 			return GroupRenderer{}, err
 		}
 		log.Entry(ctx).Infof("setting up kpt renderer")
-		return GroupRenderer{
-			Renderers:   []Renderer{r},
-			HookRunners: []hooks.Runner{hooks.NewRenderRunner(renderCfg.Generate.LifecycleHooks, &[]string{cfg.GetNamespace()}, hooks.NewRenderEnvOpts(cfg.GetKubeContext(), []string{cfg.GetNamespace()}))},
-		}, err
-	}
-
-	var rs GroupRenderer
-	rs.HookRunners = []hooks.Runner{hooks.NewRenderRunner(renderCfg.Generate.LifecycleHooks, &[]string{cfg.GetNamespace()}, hooks.NewRenderEnvOpts(cfg.GetKubeContext(), []string{cfg.GetNamespace()}))}
-	if renderCfg.RawK8s != nil || renderCfg.Kustomize != nil {
+		rs.Renderers = append(rs.Renderers, r)
+	} else if renderCfg.RawK8s != nil || renderCfg.Kustomize != nil {
 		r, err := kubectl.New(cfg, renderCfg, labels, configName, cfg.GetNamespace())
 		if err != nil {
 			return GroupRenderer{}, err
 		}
 		rs.Renderers = append(rs.Renderers, r)
 	}
+
 	if renderCfg.Helm != nil {
 		r, err := helm.New(cfg, renderCfg, labels, configName)
 		if err != nil {
diff --git a/pkg/skaffold/schema/validation/validation.go b/pkg/skaffold/schema/validation/validation.go
index 0c0f5fc58..85f546d6b 100644
--- a/pkg/skaffold/schema/validation/validation.go
+++ b/pkg/skaffold/schema/validation/validation.go
@@ -36,6 +36,7 @@ import (
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/output/log"
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/parser"
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/parser/configlocations"
+	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/renderer/kpt"
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext"
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest"
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/util"
@@ -87,6 +88,7 @@ func ProcessToErrorWithLocation(configs parser.SkaffoldConfigSet, validateConfig
 		errs = append(errs, validateCustomTest(config, config.Test)...)
 		errs = append(errs, validateGCBConfig(config, config.Build)...)
 		errs = append(errs, validateVerifyTests(config, config.Verify)...)
+		errs = append(errs, validateKptRendererVersion(config, config.Deploy, config.Render)...)
 	}
 	errs = append(errs, validateArtifactDependencies(configs)...)
 	if validateConfig.CheckDeploySource {
@@ -99,6 +101,25 @@ func ProcessToErrorWithLocation(configs parser.SkaffoldConfigSet, validateConfig
 	return errs
 }
 
+func validateKptRendererVersion(cfg *parser.SkaffoldConfigEntry, dc latest.DeployConfig, rc latest.RenderConfig) (cfgErrs []ErrorWithLocation) {
+	if dc.KptDeploy != nil {
+		return
+	}
+
+	if rc.Kpt == nil && rc.Transform == nil && rc.Validate == nil { // no kpt renderer created
+		return
+	}
+
+	if err := kpt.CheckIsProperBinVersion(context.TODO()); err != nil {
+		cfgErrs = append(cfgErrs, ErrorWithLocation{
+			Error:    err,
+			Location: cfg.YAMLInfos.LocateField(cfg, "Render"),
+		})
+	}
+
+	return
+}
+
 // Process checks if the Skaffold pipeline is valid and returns all encountered errors as a concatenated string
 func Process(configs parser.SkaffoldConfigSet, validateConfig Options) error {
 	errs := ProcessToErrorWithLocation(configs, validateConfig)
diff --git a/pkg/skaffold/verify/docker/verify.go b/pkg/skaffold/verify/docker/verify.go
index 2174709da..cdebfee04 100644
--- a/pkg/skaffold/verify/docker/verify.go
+++ b/pkg/skaffold/verify/docker/verify.go
@@ -21,7 +21,6 @@ import (
 	"fmt"
 	"io"
 	"math"
-	"os"
 	"path"
 	"strings"
 	"sync"
@@ -216,8 +215,6 @@ func (v *Verifier) createAndRunContainer(ctx context.Context, out io.Writer, art
 	opts.Bindings = bindings
 	// verify waits for run to complete
 	opts.Wait = true
-	// verify passes through os env to container env
-	opts.ContainerConfig.Env = os.Environ()
 
 	eventV2.VerifyInProgress(opts.VerifyTestName)
 	statusCh, errCh, id, err := v.client.Run(ctx, out, opts)


Test patch:
diff --git a/integration/verify_test.go b/integration/verify_test.go
index 3a2f74a3f..b81c67748 100644
--- a/integration/verify_test.go
+++ b/integration/verify_test.go
@@ -29,8 +29,6 @@ import (
 
 func TestVerifyPassingTestsWithEnvVar(t *testing.T) {
 	MarkIntegrationTest(t, CanRunWithoutGcp)
-	os.Setenv("FOO", "foo-var")
-	defer os.Unsetenv("FOO")
 	tmp := t.TempDir()
 	logFile := filepath.Join(tmp, uuid.New().String()+"logs.json")
 
@@ -41,7 +39,6 @@ func TestVerifyPassingTestsWithEnvVar(t *testing.T) {
 
 	testutil.CheckError(t, false, err)
 	testutil.CheckContains(t, "Hello from Docker!", logs)
-	testutil.CheckContains(t, "foo-var", logs)
 	testutil.CheckContains(t, "alpine-1", logs)
 	testutil.CheckContains(t, "alpine-2", logs)
 
@@ -52,15 +49,12 @@ func TestVerifyPassingTestsWithEnvVar(t *testing.T) {
 	}
 	v2EventLogs := string(b)
 	testutil.CheckContains(t, "Hello from Docker!", v2EventLogs)
-	testutil.CheckContains(t, "foo-var", v2EventLogs)
 
 	// TODO(aaron-prindle) verify that SUCCEEDED event is found where expected
 }
 
 func TestVerifyOneTestFailsWithEnvVar(t *testing.T) {
 	MarkIntegrationTest(t, CanRunWithoutGcp)
-	os.Setenv("FOO", "foo-var")
-	defer os.Unsetenv("FOO")
 	tmp := t.TempDir()
 	logFile := filepath.Join(tmp, uuid.New().String()+"logs.json")
 
@@ -71,7 +65,6 @@ func TestVerifyOneTestFailsWithEnvVar(t *testing.T) {
 
 	testutil.CheckError(t, true, err)
 	testutil.CheckContains(t, "Hello from Docker!", logs)
-	testutil.CheckContains(t, "foo-var", logs)
 
 	// verify logs are in the event output as well
 	b, err := os.ReadFile(logFile + ".v2")
@@ -80,8 +73,6 @@ func TestVerifyOneTestFailsWithEnvVar(t *testing.T) {
 	}
 	v2EventLogs := string(b)
 	testutil.CheckContains(t, "Hello from Docker!", v2EventLogs)
-	testutil.CheckContains(t, "foo-var", v2EventLogs)
-
 	// TODO(aaron-prindle) verify that FAILED event is found where expected
 }
 
diff --git a/pkg/skaffold/deploy/deploy_mux_test.go b/pkg/skaffold/deploy/deploy_mux_test.go
index 6813cf74c..646e14aea 100644
--- a/pkg/skaffold/deploy/deploy_mux_test.go
+++ b/pkg/skaffold/deploy/deploy_mux_test.go
@@ -22,6 +22,8 @@ import (
 	"io"
 	"testing"
 
+	"github.com/google/go-cmp/cmp"
+
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/access"
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug"
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph"
@@ -218,3 +220,45 @@ func TestDeployerMux_Dependencies(t *testing.T) {
 		})
 	}
 }
+
+func TestDeployerMux_GetDeployersInverse(t *testing.T) {
+	d1 := NewMockDeployer()
+	d2 := NewMockDeployer()
+	d3 := NewMockDeployer()
+	d4 := NewMockDeployer()
+	d5 := NewMockDeployer()
+
+	tests := []struct {
+		name     string
+		args     []Deployer
+		expected []Deployer
+	}{
+		{
+			name:     "uneven slice",
+			args:     []Deployer{d1, d2, d3, d4, d5},
+			expected: []Deployer{d5, d4, d3, d2, d1},
+		},
+		{
+			name:     "even slice",
+			args:     []Deployer{d1, d2, d3, d4},
+			expected: []Deployer{d4, d3, d2, d1},
+		},
+		{
+			name:     "slice of one",
+			args:     []Deployer{d1},
+			expected: []Deployer{d1},
+		},
+		{
+			name:     "slice of zero",
+			args:     []Deployer{},
+			expected: []Deployer{},
+		},
+	}
+
+	for _, test := range tests {
+		t.Run(test.name, func(t *testing.T) {
+			deployerMux := DeployerMux{deployers: test.args, iterativeStatusCheck: false}
+			testutil.CheckDeepEqual(t, test.expected, deployerMux.GetDeployersInverse(), cmp.AllowUnexported(MockDeployer{}))
+		})
+	}
+}
diff --git a/pkg/skaffold/render/generate/generate_test.go b/pkg/skaffold/render/generate/generate_test.go
index 1d204bd64..8986eb657 100644
--- a/pkg/skaffold/render/generate/generate_test.go
+++ b/pkg/skaffold/render/generate/generate_test.go
@@ -189,7 +189,7 @@ func TestGenerate(t *testing.T) {
 				Touch("empty.ignored").
 				Chdir()
 
-			g := NewGenerator(".", test.generateConfig)
+			g := NewGenerator(".", test.generateConfig, "")
 			var output bytes.Buffer
 			actual, err := g.Generate(context.Background(), &output)
 			defer os.RemoveAll(".kpt-pipeline")
@@ -208,7 +208,7 @@ func TestGenerateFromURLManifest(t *testing.T) {
 	defer os.RemoveAll(manifest.ManifestTmpDir)
 	g := NewGenerator(".", latest.Generate{
 		RawK8s: []string{ts.URL},
-	})
+	}, "")
 	var output bytes.Buffer
 	actual, err := g.Generate(context.Background(), &output)
 	testutil.Run(t, "", func(t *testutil.T) {
diff --git a/pkg/skaffold/schema/validation/samples_test.go b/pkg/skaffold/schema/validation/samples_test.go
index fb8ea996d..0c9ff1399 100644
--- a/pkg/skaffold/schema/validation/samples_test.go
+++ b/pkg/skaffold/schema/validation/samples_test.go
@@ -18,6 +18,7 @@ package validation
 
 import (
 	"bytes"
+	"context"
 	"fmt"
 	"os"
 	"path/filepath"
@@ -25,6 +26,7 @@ import (
 	"testing"
 
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/parser"
+	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/renderer/kpt"
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema"
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/defaults"
 	"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest"
@@ -92,6 +94,9 @@ func checkSkaffoldConfig(t *testutil.T, yaml []byte) {
 		t.CheckNoError(err)
 		cfgs = append(cfgs, cfg)
 	}
+	t.Override(&kpt.KptVersion, func(_ context.Context) (string, error) {
+		return "1.0.0-beta.13", nil
+	})
 	err = Process(cfgs, Options{CheckDeploySource: false})
 	t.CheckNoError(err)
 }