Repository: kubernetes/kompose
Pull request #1723 (2023-10-06 15:03:01)

chore(deps)(deps): bump golang.org/x/tools from 0.13.0 to 0.14.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.13.0 to 0.14.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golang/tools/releases">golang.org/x/tools's releases</a>.</em></p>
<blockquote>
<h2>gopls/v0.13.2</h2>
<p><code>golang/go#61813</code></p>
<h2>gopls/v0.13.1</h2>
<p>This is a patch release to fix three issues with the v0.13.0 release:</p>
<ul>
<li><a href="https://redirect.github.com/golang/go/issues/61670">golang/go#61670</a>: broken imports due to corrupted export data</li>
<li><a href="https://redirect.github.com/golang/go/issues/61693">golang/go#61693</a>: panic in stubmethods with variadic args</li>
<li><a href="https://redirect.github.com/golang/go/issues/61692">golang/go#61692</a>: gofumpt integration panics when used with the new go directive syntax in go.mod files (e.g. <code>go 1.21rc3</code>)</li>
</ul>
<p>Incidentally, this release also picks up a few fixes for references and renaming. See the <a href="https://github.com/golang/go/milestone/325?closed=1">milestone</a> for the complete list of resolved issues.</p>
<p>Thank you to all who reported bugs. If are still encountering problems, please <a href="https://github.com/golang/go/issues/new?assignees=&amp;labels=gopls+Tools&amp;projects=&amp;template=03-gopls.md&amp;title=x%2Ftools%2Fgopls%3A+">file an issue</a>.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/golang/tools/commit/3f4194ee29d7db9b59757dfff729ef55cf89661c"><code>3f4194e</code></a> go.mod: update golang.org/x dependencies</li>
<li><a href="https://github.com/golang/tools/commit/1e4ce7c30c4154090d22d1c2b9bd490e91a7796b"><code>1e4ce7c</code></a> internal/refactor/inline: yet more tweaks to everything test</li>
<li><a href="https://github.com/golang/tools/commit/ee20ddf1f71a4f7eb6e7b5dff2d13125f81ce480"><code>ee20ddf</code></a> internal/refactor/inline: permit return conversions in tailcall</li>
<li><a href="https://github.com/golang/tools/commit/db1d1e0d3387b47f53b696e1ba08fc6349611854"><code>db1d1e0</code></a> gopls/internal/lsp: go to definition from embed directive</li>
<li><a href="https://github.com/golang/tools/commit/2be977ecc58df8383c28bc0587b6db6af20638d5"><code>2be977e</code></a> internal/refactor/inline: work around channel type misformatting</li>
<li><a href="https://github.com/golang/tools/commit/0ba9c8439eadd6c895b30ea434b398069e586c9b"><code>0ba9c84</code></a> internal/fuzzy: several improvements for symbol matching</li>
<li><a href="https://github.com/golang/tools/commit/c2725ad84073176c5c7b67f540af92eaf0e4b3da"><code>c2725ad</code></a> gopls: update x/telemetry dependency</li>
<li><a href="https://github.com/golang/tools/commit/e8722c010395d3c3528b2ea232476a2d15ac4af3"><code>e8722c0</code></a> go/types/internal/play: show types.Selection information</li>
<li><a href="https://github.com/golang/tools/commit/a819c616c80e59828f9fea810e2e9b84d6023cce"><code>a819c61</code></a> internal/refactor/inline: eliminate unnecessary binding decl</li>
<li><a href="https://github.com/golang/tools/commit/102b64b540a5c70e954994db144d96a2b52b799c"><code>102b64b</code></a> internal/refactor/inline: tweak everything-test docs again</li>
<li>Additional commits viewable in <a href="https://github.com/golang/tools/compare/v0.13.0...v0.14.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/tools&package-manager=go_modules&previous-version=0.13.0&new-version=0.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

k8s-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes/kompose/pull/1723#" title="Author self-approved">dependabot[bot]</a>*
**Once this PR has been reviewed and has the lgtm label**, please assign [hangyan](https://github.com/hangyan) for approval. For more information see [the Kubernetes Code Review Process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process).

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes%2Fkompose).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/kubernetes/kompose/blob/main/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["hangyan"]} -->

Patch:
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index c6340f0e..97ce43b2 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -28,7 +28,6 @@ jobs:
     - name: Build
       run: make bin
 
-      
     - name: Upload a Build Artifact
       uses: actions/upload-artifact@v3
       with:
diff --git a/go.mod b/go.mod
index d518f917..862f8c15 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/kubernetes/kompose
 go 1.18
 
 require (
-	github.com/compose-spec/compose-go v1.19.0
+	github.com/compose-spec/compose-go v1.20.0
 	github.com/deckarep/golang-set v1.8.0
 	github.com/fatih/structs v1.1.0
 	github.com/fsouza/go-dockerclient v1.9.7
@@ -18,11 +18,11 @@ require (
 	github.com/spf13/cast v1.5.1
 	github.com/spf13/cobra v1.7.0
 	github.com/spf13/viper v1.16.0
-	golang.org/x/tools v0.13.0
+	golang.org/x/tools v0.14.0
 	gopkg.in/yaml.v3 v3.0.1
 	gotest.tools/v3 v3.5.1
 	k8s.io/api v0.28.2
-	k8s.io/apimachinery v0.28.2
+	k8s.io/apimachinery v0.28.3
 )
 
 require (
@@ -30,7 +30,7 @@ require (
 	github.com/Microsoft/go-winio v0.6.0 // indirect
 	github.com/containerd/containerd v1.6.18 // indirect
 	github.com/distribution/reference v0.5.0 // indirect
-	github.com/docker/docker v23.0.3+incompatible // indirect
+	github.com/docker/docker v24.0.7+incompatible // indirect
 	github.com/docker/go-connections v0.4.0 // indirect
 	github.com/docker/go-units v0.5.0 // indirect
 	github.com/fsnotify/fsnotify v1.6.0 // indirect
@@ -62,9 +62,9 @@ require (
 	github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
 	github.com/xeipuuv/gojsonschema v1.2.0 // indirect
 	golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect
-	golang.org/x/mod v0.12.0 // indirect
+	golang.org/x/mod v0.13.0 // indirect
 	golang.org/x/net v0.17.0 // indirect
-	golang.org/x/sync v0.3.0 // indirect
+	golang.org/x/sync v0.4.0 // indirect
 	golang.org/x/sys v0.13.0 // indirect
 	golang.org/x/text v0.13.0 // indirect
 	gopkg.in/inf.v0 v0.9.1 // indirect
diff --git a/go.sum b/go.sum
index c5e28403..6570694d 100644
--- a/go.sum
+++ b/go.sum
@@ -36,6 +36,7 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
 cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
+github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8 h1:V8krnnfGj4pV65YLUm3C0/8bl7V5Nry2Pwvy3ru/wLc=
 github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
 github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
@@ -53,12 +54,11 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
 github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
 github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
 github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/compose-spec/compose-go v1.19.0 h1:t68gAcwStDg0hy2kFvqHJIksf6xkqRnlSKfL45/ETqo=
-github.com/compose-spec/compose-go v1.19.0/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM=
+github.com/compose-spec/compose-go v1.20.0 h1:h4ZKOst1EF/DwZp7dWkb+wbTVE4nEyT9Lc89to84Ol4=
+github.com/compose-spec/compose-go v1.20.0/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM=
 github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
 github.com/containerd/containerd v1.6.18 h1:qZbsLvmyu+Vlty0/Ex5xc0z2YtKpIsb5n45mAMI+2Ns=
 github.com/containerd/containerd v1.6.18/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew7/0YS8O5eQZrOw=
-github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg=
 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
 github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
 github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
@@ -72,8 +72,8 @@ github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsP
 github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
 github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
 github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
-github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho=
-github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM=
+github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
 github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
 github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
 github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
@@ -333,8 +333,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
-golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
+golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -388,8 +388,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
 golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
-golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
+golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
+golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -502,8 +502,8 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f
 golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
-golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
+golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
+golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -625,8 +625,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw=
 k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg=
-k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ=
-k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU=
+k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A=
+k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8=
 k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
 k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
 k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk=
diff --git a/pkg/transformer/kubernetes/k8sutils.go b/pkg/transformer/kubernetes/k8sutils.go
index bb6ac558..6241dea0 100644
--- a/pkg/transformer/kubernetes/k8sutils.go
+++ b/pkg/transformer/kubernetes/k8sutils.go
@@ -686,14 +686,16 @@ func getServiceGroupID(service kobject.ServiceConfig, mode string) string {
 //     A warn/info message should be printed to let the user know.
 func KomposeObjectToServiceConfigGroupMapping(komposeObject *kobject.KomposeObject, opt kobject.ConvertOptions) map[string]kobject.ServiceConfigGroup {
 	serviceConfigGroup := make(map[string]kobject.ServiceConfigGroup)
+	sortedServiceConfigs := SortedKeys(komposeObject.ServiceConfigs)
 
-	for name, service := range komposeObject.ServiceConfigs {
-		groupID := getServiceGroupID(service, opt.ServiceGroupMode)
+	for _, service := range sortedServiceConfigs {
+		serviceConfig := komposeObject.ServiceConfigs[service]
+		groupID := getServiceGroupID(serviceConfig, opt.ServiceGroupMode)
 		if groupID != "" {
-			service.Name = name
-			service.InGroup = true
-			serviceConfigGroup[groupID] = append(serviceConfigGroup[groupID], service)
-			komposeObject.ServiceConfigs[name] = service
+			serviceConfig.Name = service
+			serviceConfig.InGroup = true
+			serviceConfigGroup[groupID] = append(serviceConfigGroup[groupID], serviceConfig)
+			komposeObject.ServiceConfigs[service] = serviceConfig
 		}
 	}
 
@@ -806,9 +808,9 @@ func (k *Kubernetes) RemoveDupObjects(objs *[]runtime.Object) {
 }
 
 // SortedKeys Ensure the kubernetes objects are in a consistent order
-func SortedKeys(komposeObject kobject.KomposeObject) []string {
+func SortedKeys[V kobject.ServiceConfig | kobject.ServiceConfigGroup](serviceConfig map[string]V) []string {
 	var sortedKeys []string
-	for name := range komposeObject.ServiceConfigs {
+	for name := range serviceConfig {
 		sortedKeys = append(sortedKeys, name)
 	}
 	sort.Strings(sortedKeys)
@@ -851,8 +853,15 @@ func GetContentFromFile(file string) (string, error) {
 // FormatEnvName format env name
 func FormatEnvName(name string) string {
 	envName := strings.Trim(name, "./")
+	// only take string after the last slash only if the string contains a slash
+	if strings.Contains(envName, "/") {
+		envName = envName[strings.LastIndex(envName, "/")+1:]
+	}
+	// take only last 63 chars
+	if len(envName) > 63 {
+		envName = envName[len(envName)-63:]
+	}
 	envName = strings.Replace(envName, ".", "-", -1)
-	envName = strings.Replace(envName, "/", "-", -1)
 	return envName
 }
 
diff --git a/pkg/transformer/kubernetes/kubernetes.go b/pkg/transformer/kubernetes/kubernetes.go
index 57e8ee18..3ced87bf 100644
--- a/pkg/transformer/kubernetes/kubernetes.go
+++ b/pkg/transformer/kubernetes/kubernetes.go
@@ -1455,28 +1455,33 @@ func (k *Kubernetes) Transform(komposeObject kobject.KomposeObject, opt kobject.
 	if opt.ServiceGroupMode != "" {
 		log.Debugf("Service group mode is: %s", opt.ServiceGroupMode)
 		komposeObjectToServiceConfigGroupMapping := KomposeObjectToServiceConfigGroupMapping(&komposeObject, opt)
-		for name, group := range komposeObjectToServiceConfigGroupMapping {
+		sortedGroupMappingKeys := SortedKeys(komposeObjectToServiceConfigGroupMapping)
+		for _, group := range sortedGroupMappingKeys {
+			groupMapping := komposeObjectToServiceConfigGroupMapping[group]
 			var objects []runtime.Object
 			podSpec := PodSpec{}
 
+			var groupName string
 			// if using volume group, the name here will be a volume config string. reset to the first service name
 			if opt.ServiceGroupMode == "volume" {
 				if opt.ServiceGroupName != "" {
-					name = opt.ServiceGroupName
+					groupName = opt.ServiceGroupName
 				} else {
 					var names []string
-					for _, svc := range group {
+					for _, svc := range groupMapping {
 						names = append(names, svc.Name)
 					}
-					name = strings.Join(names, "-")
+					groupName = strings.Join(names, "-")
 				}
+			} else {
+				groupName = group
 			}
 
 			// added a container
 			// ports conflict check between services
 			portsUses := map[string]bool{}
 
-			for _, service := range group {
+			for _, service := range groupMapping {
 				// first do ports check
 				ports := ConfigPorts(service)
 				for _, port := range ports {
@@ -1487,7 +1492,7 @@ func (k *Kubernetes) Transform(komposeObject kobject.KomposeObject, opt kobject.
 					portsUses[key] = true
 				}
 
-				log.Infof("Group Service %s to [%s]", service.Name, name)
+				log.Infof("Group Service %s to [%s]", service.Name, groupName)
 				service.WithKomposeAnnotation = opt.WithKomposeAnnotation
 				podSpec.Append(AddContainer(service, opt))
 
@@ -1495,17 +1500,17 @@ func (k *Kubernetes) Transform(komposeObject kobject.KomposeObject, opt kobject.
 					return nil, err
 				}
 				// override..
-				objects = append(objects, k.CreateWorkloadAndConfigMapObjects(name, service, opt)...)
-				k.configKubeServiceAndIngressForService(service, name, &objects)
+				objects = append(objects, k.CreateWorkloadAndConfigMapObjects(groupName, service, opt)...)
+				k.configKubeServiceAndIngressForService(service, groupName, &objects)
 
 				// Configure the container volumes.
-				volumesMount, volumes, pvc, cms, err := k.ConfigVolumes(name, service)
+				volumesMount, volumes, pvc, cms, err := k.ConfigVolumes(groupName, service)
 				if err != nil {
 					return nil, errors.Wrap(err, "k.ConfigVolumes failed")
 				}
 				// Configure Tmpfs
 				if len(service.TmpFs) > 0 {
-					TmpVolumesMount, TmpVolumes := k.ConfigTmpfs(name, service)
+					TmpVolumesMount, TmpVolumes := k.ConfigTmpfs(groupName, service)
 					volumes = append(volumes, TmpVolumes...)
 					volumesMount = append(volumesMount, TmpVolumesMount...)
 				}
@@ -1527,14 +1532,14 @@ func (k *Kubernetes) Transform(komposeObject kobject.KomposeObject, opt kobject.
 
 				podSpec.Append(
 					SetPorts(service),
-					ImagePullPolicy(name, service),
-					RestartPolicy(name, service),
-					SecurityContext(name, service),
+					ImagePullPolicy(groupName, service),
+					RestartPolicy(groupName, service),
+					SecurityContext(groupName, service),
 					HostName(service),
 					DomainName(service),
 					ResourcesLimits(service),
 					ResourcesRequests(service),
-					TerminationGracePeriodSeconds(name, service),
+					TerminationGracePeriodSeconds(groupName, service),
 					TopologySpreadConstraints(service),
 				)
 
@@ -1542,7 +1547,7 @@ func (k *Kubernetes) Transform(komposeObject kobject.KomposeObject, opt kobject.
 					podSpec.Append(ServiceAccountName(serviceAccountName))
 				}
 
-				err = k.UpdateKubernetesObjectsMultipleContainers(name, service, &objects, podSpec)
+				err = k.UpdateKubernetesObjectsMultipleContainers(groupName, service, &objects, podSpec)
 				if err != nil {
 					return nil, errors.Wrap(err, "Error transforming Kubernetes objects")
 				}
@@ -1557,7 +1562,7 @@ func (k *Kubernetes) Transform(komposeObject kobject.KomposeObject, opt kobject.
 			allobjects = append(allobjects, objects...)
 		}
 	}
-	sortedKeys := SortedKeys(komposeObject)
+	sortedKeys := SortedKeys(komposeObject.ServiceConfigs)
 	for _, name := range sortedKeys {
 		service := komposeObject.ServiceConfigs[name]
 
diff --git a/pkg/transformer/openshift/openshift.go b/pkg/transformer/openshift/openshift.go
index 8e77262e..04f5a155 100644
--- a/pkg/transformer/openshift/openshift.go
+++ b/pkg/transformer/openshift/openshift.go
@@ -280,7 +280,7 @@ func (o *OpenShift) Transform(komposeObject kobject.KomposeObject, opt kobject.C
 		}
 	}
 
-	sortedKeys := kubernetes.SortedKeys(komposeObject)
+	sortedKeys := kubernetes.SortedKeys(komposeObject.ServiceConfigs)
 	for _, name := range sortedKeys {
 		service := komposeObject.ServiceConfigs[name]
 		var objects []runtime.Object
@@ -428,7 +428,9 @@ func (o *OpenShift) Transform(komposeObject kobject.KomposeObject, opt kobject.C
 	// sort all object so Services are first
 	o.SortServicesFirst(&allobjects)
 	o.RemoveDupObjects(&allobjects)
-	transformer.AssignNamespaceToObjects(&allobjects, komposeObject.Namespace)
+	if komposeObject.Namespace != "" {
+		transformer.AssignNamespaceToObjects(&allobjects, komposeObject.Namespace)
+	}
 	// o.FixWorkloadVersion(&allobjects)
 
 	return allobjects, nil


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index e083215a..9bd8efd9 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -20,6 +20,8 @@ jobs:
       - uses: actions/setup-go@v4
         with:
           go-version: ${{ matrix.go }}
+      - name: Install dyff
+        run: go install github.com/homeport/dyff/cmd/dyff@v1.5.8
       - name: Run tests
         run: make test
       - name: Perform cross compile
@@ -34,6 +36,8 @@ jobs:
       - uses: actions/setup-go@v4
         with:
           go-version: 1.19
+      - name: Install dyff
+        run: go install github.com/homeport/dyff/cmd/dyff@v1.5.8
       - name: Create .coverprofile for each targeted directory by re:running tests
         run: make test
       - name: Collect all .coverprofile files and save it to one file gover.coverprofile
diff --git a/pkg/transformer/kubernetes/k8sutils_test.go b/pkg/transformer/kubernetes/k8sutils_test.go
index 15cfd87f..d050a610 100644
--- a/pkg/transformer/kubernetes/k8sutils_test.go
+++ b/pkg/transformer/kubernetes/k8sutils_test.go
@@ -511,7 +511,7 @@ func TestSortedKeys(t *testing.T) {
 	komposeObject := kobject.KomposeObject{
 		ServiceConfigs: map[string]kobject.ServiceConfig{"b": service, "a": service1},
 	}
-	a := SortedKeys(komposeObject)
+	a := SortedKeys(komposeObject.ServiceConfigs)
 	if !reflect.DeepEqual(a, c) {
 		t.Logf("Test Fail output should be %s", c)
 	}
diff --git a/script/test/cmd/lib.sh b/script/test/cmd/lib.sh
index 5141b961..cac3ff46 100644
--- a/script/test/cmd/lib.sh
+++ b/script/test/cmd/lib.sh
@@ -100,10 +100,10 @@ function convert::match_output() {
     convert::run_cmd $cmd
     exit_status=$?
     if [ $exit_status -ne 0 ]; then FAIL_MSGS=$FAIL_MSGS"exit status: $exit_status\n"; return $exit_status; fi
-    match=$(diff <(yq ea '[.] | sort_by(.metadata.name) | .[] | splitDoc' $expected_output) <(yq ea '[.] | sort_by(.metadata.name) | .[] | splitDoc' $TEMP_STDOUT))
-    echo "$match" > /tmp/diff
-    if [ "$match" == "" ]; then SUCCESS_MSGS=$SUCCESS_MSGS"converted output matches\n"; return 0;
-    else FAIL_MSGS=$FAIL_MSGS"converted output does not match\n"; cat /tmp/diff; rm /tmp/diff; return 1; 
+
+    match=$(dyff between --ignore-order-changes --set-exit-code $expected_output $TEMP_STDOUT)
+    if [ $? -eq 0 ]; then SUCCESS_MSGS=$SUCCESS_MSGS"converted output matches\n"; return 0;
+    else FAIL_MSGS=$FAIL_MSGS"converted output does not match\n"; echo $match; return 1; 
     fi
 }
 readonly -f convert::match_output
diff --git a/script/test/cmd/tests_new.sh b/script/test/cmd/tests_new.sh
index 92cd7b27..25107cf9 100755
--- a/script/test/cmd/tests_new.sh
+++ b/script/test/cmd/tests_new.sh
@@ -113,8 +113,8 @@ k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/doc
 os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/output-k8s.yaml"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/output-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success_and_warning "$os_cmd" "$os_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success_and_warning "$os_cmd" "$os_output" || exit 1
 
 # # TEST the placement
 # should convert placement to affinity
@@ -122,8 +122,8 @@ k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/deploy/placement/docker-c
 os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/deploy/placement/docker-compose-placement.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/deploy/placement/output-placement-k8s.yaml"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/deploy/placement/output-placement-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success_and_warning "$os_cmd" "$os_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success_and_warning "$os_cmd" "$os_output" || exit 1
 
 
 # test configmap volume
@@ -131,173 +131,177 @@ k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-c
 os_cmd="kompose  --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-compose.yml convert --stdout --with-kompose-annotation=false --volumes=configMap"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-k8s.yaml"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # test configmap volume using service label
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-compose-withlabel.yml convert --stdout --with-kompose-annotation=false"
 os_cmd="kompose  --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-compose-withlabel.yml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-os-withlabel.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # Test that emptyDir works
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout --volumes emptyDir"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-k8s-empty-vols-template.yaml"
 os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout --volumes emptyDir"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-os-empty-vols-template.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # Test that emptyvols works
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout --emptyvols"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-k8s.yaml"
 os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout --emptyvols"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success_and_warning "$os_cmd" "$os_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success_and_warning "$os_cmd" "$os_output" || exit 1
 
 # test service expose
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/expose/compose.yaml convert --stdout --with-kompose-annotation=false"
 ocp_cmd="kompose  --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/expose/compose.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/expose/output-k8s.yaml"
 ocp_output="$KOMPOSE_ROOT/script/test/fixtures/expose/output-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$ocp_cmd" "$ocp_output"
+convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$ocp_cmd" "$ocp_output" || exit 1
 
 
 # test service group by volume, not support openshift for now
-k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/service-group/compose.yaml convert --stdout --with-kompose-annotation=false --service-group-mode=volume"
+k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/service-group/compose.yaml convert --stdout --with-kompose-annotation=false --service-group-mode=volume --service-group-name=librenms-dispatcher"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/service-group/output-k8s.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
 
 # test merge multiple compose files
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/first.yaml -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/second.yaml convert --stdout --with-kompose-annotation=false"
 ocp_cmd="kompose  --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/first.yaml -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/second.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-files/output-k8s.yaml"
 ocp_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-files/output-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$ocp_cmd" "$ocp_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$ocp_cmd" "$ocp_output" || exit 1
 
 # test health check
-k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml convert --stdout --service-group-mode=label --with-kompose-annotation=false"
-os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml convert --stdout --service-group-mode=label --with-kompose-annotation=false"
+k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml convert --stdout --with-kompose-annotation=false"
+os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/healthcheck/output-healthcheck-k8s.yaml"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/healthcheck/output-healthcheck-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # test statefulset
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/statefulset/docker-compose.yaml convert --stdout --with-kompose-annotation=false --controller statefulset"
 ocp_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/statefulset/docker-compose.yaml convert --stdout --with-kompose-annotation=false --controller statefulset"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/statefulset/output-k8s.yaml"
 ocp_output="$KOMPOSE_ROOT/script/test/fixtures/statefulset/output-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$ocp_cmd" "$ocp_output"
+convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$ocp_cmd" "$ocp_output" || exit 1
 
 # test specifying volume type using service label
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 os_cmd="kompose  --provider=openshift -f  $KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/docker-compose.yaml  convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/output-k8s.yaml"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/output-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # Test environment variables interpolation
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 os_cmd="kompose  --provider=openshift -f  $KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/docker-compose.yaml  convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/output-k8s.yaml"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/output-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success_and_warning "$os_cmd" "$os_output" || exit 1
 
 # Test single file output feature
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/single-file-output/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/single-file-output/output-k8s.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
 
 # Test host port and protocol feature
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/host-port-protocol/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/host-port-protocol/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/host-port-protocol/output-k8s.yaml"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/host-port-protocol/output-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # Test external traffic policy feature with valid configuration, warning is coming from the network policy.
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/docker-compose-v1.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/output-k8s-v1.yaml"
 os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/docker-compose-v1.yaml convert --stdout --with-kompose-annotation=false"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/output-os-v1.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # Test external traffic policy feature with warning, because we have nodeport with external traffic policy
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/docker-compose-v2.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/output-k8s-v2.yaml"
 os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/docker-compose-v2.yaml convert --stdout --with-kompose-annotation=false"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/external-traffic-policy/output-os-v2.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success_and_warning "$os_cmd" "$os_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success_and_warning "$os_cmd" "$os_output" || exit 1
 
 # Test Pod security context fs group
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/fsgroup/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/fsgroup/output-k8s.yaml"
 os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/fsgroup/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/fsgroup/output-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success_and_warning "$os_cmd" "$os_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # Test support for compose.yaml file
-k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/compose-file-support/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
+k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/compose-file-support/compose.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/compose-file-support/output-k8s.yaml"
-convert::expect_success "$k8s_cmd" "$k8s_output"
+convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
 
 # Test support for compose env interpolation
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/compose-env-interpolation/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/compose-env-interpolation/output-k8s.yaml"
-convert::expect_success "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # Test support for subpath volume
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/vols-subpath/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/vols-subpath/output-k8s.yaml"
 os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/vols-subpath/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/vols-subpath/output-os.yaml"
-convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # Test support for network policies generation
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/network-policies/docker-compose.yaml convert --generate-network-policies --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/network-policies/output-k8s.yaml"
-convert::expect_success "$k8s_cmd" "$k8s_output"
-
-# Test support for custom build and push images
-k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/custom-build-push/docker-compose.yaml convert --build-command 'docker build -t ahmedgrati/kompose-test ./script/test/fixtures/custom-build-push' --push-command 'docker push ahmedgrati/kompose-test' --stdout --with-kompose-annotation=false"
-k8s_output="$KOMPOSE_ROOT/script/test/fixtures/custom-build-push/output-k8s.yaml"
-convert::expect_success "$k8s_cmd" "$k8s_output"
+convert::expect_success_and_warning "$k8s_cmd" "$k8s_output" || exit 1
 
 # Test support for namespace generation
 k8s_cmd="kompose -f ./script/test/fixtures/namespace/docker-compose.yaml convert --stdout --with-kompose-annotation=false -n web"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/namespace/output-k8s.yaml"
 os_cmd="kompose -f ./script/test/fixtures/namespace/docker-compose.yaml convert --stdout --with-kompose-annotation=false -n web --provider openshift"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/namespace/output-os.yaml"
-convert::expect_success "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # Test support for read only root fs
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/read-only/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/read-only/output-k8s.yaml"
 os_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/read-only/docker-compose.yaml convert --stdout --with-kompose-annotation=false --provider openshift"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/read-only/output-os.yaml"
-convert::expect_success "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
 
 # Test env_file support
 k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/env/docker-compose.yml convert --stdout --with-kompose-annotation=false"
 k8s_output="$KOMPOSE_ROOT/script/test/fixtures/env/output-k8s.yaml"
 os_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/env/docker-compose.yml convert --provider openshift --stdout --with-kompose-annotation=false"
 os_output="$KOMPOSE_ROOT/script/test/fixtures/env/output-os.yaml"
-convert::expect_success "$k8s_cmd" "$k8s_output"
-convert::expect_success "$os_cmd" "$os_output"
+convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+convert::expect_success "$os_cmd" "$os_output" || exit 1
+
+# disabled until FormatEnvName can take into account conflicting/duplicate file names
+# Test env_file support for multiple env_file with the same name from different dirs
+# k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/env-multiple/docker-compose.yml convert --stdout --with-kompose-annotation=false"
+# k8s_output="$KOMPOSE_ROOT/script/test/fixtures/env-multiple/output-k8s.yaml"
+# os_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/env-multiple/docker-compose.yml convert --provider openshift --stdout --with-kompose-annotation=false"
+# os_output="$KOMPOSE_ROOT/script/test/fixtures/env-multiple/output-os.yaml"
+# convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
+# convert::expect_success "$os_cmd" "$os_output" || exit 1
diff --git a/script/test/fixtures/change-in-volume/output-k8s-empty-vols-template.yaml b/script/test/fixtures/change-in-volume/output-k8s-empty-vols-template.yaml
index 831d5053..673e998f 100644
--- a/script/test/fixtures/change-in-volume/output-k8s-empty-vols-template.yaml
+++ b/script/test/fixtures/change-in-volume/output-k8s-empty-vols-template.yaml
@@ -8,7 +8,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   clusterIP: None
   ports:
@@ -28,7 +27,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   ports:
     - name: "5000"
@@ -49,7 +47,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -80,7 +77,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
diff --git a/script/test/fixtures/change-in-volume/output-k8s.yaml b/script/test/fixtures/change-in-volume/output-k8s.yaml
index 831d5053..673e998f 100644
--- a/script/test/fixtures/change-in-volume/output-k8s.yaml
+++ b/script/test/fixtures/change-in-volume/output-k8s.yaml
@@ -8,7 +8,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   clusterIP: None
   ports:
@@ -28,7 +27,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   ports:
     - name: "5000"
@@ -49,7 +47,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -80,7 +77,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
diff --git a/script/test/fixtures/change-in-volume/output-os-empty-vols-template.yaml b/script/test/fixtures/change-in-volume/output-os-empty-vols-template.yaml
index ad02b0f9..40061b7a 100644
--- a/script/test/fixtures/change-in-volume/output-os-empty-vols-template.yaml
+++ b/script/test/fixtures/change-in-volume/output-os-empty-vols-template.yaml
@@ -8,7 +8,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   clusterIP: None
   ports:
@@ -28,7 +27,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   ports:
     - name: "5000"
@@ -49,7 +47,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -95,7 +92,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -120,7 +116,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -180,7 +175,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/change-in-volume/output-os.yaml b/script/test/fixtures/change-in-volume/output-os.yaml
index ad02b0f9..40061b7a 100644
--- a/script/test/fixtures/change-in-volume/output-os.yaml
+++ b/script/test/fixtures/change-in-volume/output-os.yaml
@@ -8,7 +8,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   clusterIP: None
   ports:
@@ -28,7 +27,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   ports:
     - name: "5000"
@@ -49,7 +47,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -95,7 +92,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -120,7 +116,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -180,7 +175,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/compose-env-interpolation/docker-compose.yaml b/script/test/fixtures/compose-env-interpolation/docker-compose.yaml
index b098afdb..b9ccb53c 100644
--- a/script/test/fixtures/compose-env-interpolation/docker-compose.yaml
+++ b/script/test/fixtures/compose-env-interpolation/docker-compose.yaml
@@ -5,3 +5,5 @@ services:
     labels:
       kompose.image-pull-policy: "${IMAGE_PULL_POLICY:-IfNotPresent}"
     build: .
+    ports:
+      - 80:80
diff --git a/script/test/fixtures/compose-env-interpolation/output-k8s.yaml b/script/test/fixtures/compose-env-interpolation/output-k8s.yaml
index 109ea022..4bdcc1c1 100644
--- a/script/test/fixtures/compose-env-interpolation/output-k8s.yaml
+++ b/script/test/fixtures/compose-env-interpolation/output-k8s.yaml
@@ -1,3 +1,23 @@
+---
+apiVersion: v1
+kind: Service
+metadata:
+  annotations:
+    kompose.image-pull-policy: IfNotPresent
+  creationTimestamp: null
+  labels:
+    io.kompose.service: foo
+  name: foo
+spec:
+  ports:
+    - name: "80"
+      port: 80
+      targetPort: 80
+  selector:
+    io.kompose.service: foo
+status:
+  loadBalancer: {}
+
 ---
 apiVersion: apps/v1
 kind: Deployment
@@ -27,23 +47,11 @@ spec:
         - image: foo
           imagePullPolicy: IfNotPresent
           name: foo
+          ports:
+            - containerPort: 80
+              hostPort: 80
+              protocol: TCP
           resources: {}
       restartPolicy: Always
 status: {}
 
----
-apiVersion: networking.k8s.io/v1
-kind: NetworkPolicy
-metadata:
-  creationTimestamp: null
-  name: compose-env-interpolation-default
-spec:
-  ingress:
-    - from:
-        - podSelector:
-            matchLabels:
-              io.kompose.network/compose-env-interpolation-default: "true"
-  podSelector:
-    matchLabels:
-      io.kompose.network/compose-env-interpolation-default: "true"
-
diff --git a/script/test/fixtures/compose-file-support/output-k8s.yaml b/script/test/fixtures/compose-file-support/output-k8s.yaml
index ac735023..1ca00e60 100644
--- a/script/test/fixtures/compose-file-support/output-k8s.yaml
+++ b/script/test/fixtures/compose-file-support/output-k8s.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   ports:
     - name: "80"
@@ -25,7 +24,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
diff --git a/script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml b/script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml
index a72027ac..5e3c9d33 100644
--- a/script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml
+++ b/script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml
@@ -8,7 +8,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -55,7 +54,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db-cm0
-  namespace: default
 
 ---
 apiVersion: apps/v1
@@ -67,7 +65,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -118,7 +115,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm0
-  namespace: default
 
 ---
 apiVersion: v1
@@ -132,5 +128,4 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm1
-  namespace: default
 
diff --git a/script/test/fixtures/configmap-volume/output-k8s.yaml b/script/test/fixtures/configmap-volume/output-k8s.yaml
index 895322f8..4baf157a 100644
--- a/script/test/fixtures/configmap-volume/output-k8s.yaml
+++ b/script/test/fixtures/configmap-volume/output-k8s.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -51,7 +50,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db-cm0
-  namespace: default
 
 ---
 apiVersion: apps/v1
@@ -61,7 +59,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -110,7 +107,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm0
-  namespace: default
 
 ---
 apiVersion: v1
@@ -124,5 +120,4 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm1
-  namespace: default
 
diff --git a/script/test/fixtures/configmap-volume/output-os-withlabel.yaml b/script/test/fixtures/configmap-volume/output-os-withlabel.yaml
index 9bd9da38..4ab7aa8a 100644
--- a/script/test/fixtures/configmap-volume/output-os-withlabel.yaml
+++ b/script/test/fixtures/configmap-volume/output-os-withlabel.yaml
@@ -8,7 +8,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -66,7 +65,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -95,7 +93,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db-cm0
-  namespace: default
 
 ---
 apiVersion: apps.openshift.io/v1
@@ -107,7 +104,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -170,7 +166,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -198,7 +193,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm0
-  namespace: default
 
 ---
 apiVersion: v1
@@ -212,5 +206,4 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm1
-  namespace: default
 
diff --git a/script/test/fixtures/configmap-volume/output-os.yaml b/script/test/fixtures/configmap-volume/output-os.yaml
index 395ad9c1..c1a9628e 100644
--- a/script/test/fixtures/configmap-volume/output-os.yaml
+++ b/script/test/fixtures/configmap-volume/output-os.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -64,7 +63,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -93,7 +91,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db-cm0
-  namespace: default
 
 ---
 apiVersion: apps.openshift.io/v1
@@ -103,7 +100,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -166,7 +162,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -194,7 +189,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm0
-  namespace: default
 
 ---
 apiVersion: v1
@@ -208,5 +202,4 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm1
-  namespace: default
 
diff --git a/script/test/fixtures/custom-build-push/Dockerfile b/script/test/fixtures/custom-build-push/Dockerfile
deleted file mode 100644
index 4be68ad1..00000000
--- a/script/test/fixtures/custom-build-push/Dockerfile
+++ /dev/null
@@ -1,3 +0,0 @@
-FROM busybox
-
-CMD ["sleep", "4800"]
diff --git a/script/test/fixtures/custom-build-push/docker-compose.yaml b/script/test/fixtures/custom-build-push/docker-compose.yaml
deleted file mode 100644
index 8b24f656..00000000
--- a/script/test/fixtures/custom-build-push/docker-compose.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-version: '3.8'
-
-networks:
-  web:
-
-services:
-  nginx:
-    image: nginx
-    networks: 
-    - web
diff --git a/script/test/fixtures/custom-build-push/output-k8s.yaml b/script/test/fixtures/custom-build-push/output-k8s.yaml
deleted file mode 100644
index 32d118b6..00000000
--- a/script/test/fixtures/custom-build-push/output-k8s.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  creationTimestamp: null
-  labels:
-    io.kompose.service: nginx
-  name: nginx
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      io.kompose.service: nginx
-  strategy: {}
-  template:
-    metadata:
-      creationTimestamp: null
-      labels:
-        io.kompose.network/custom-build-push-web: "true"
-        io.kompose.service: nginx
-    spec:
-      containers:
-        - image: nginx
-          name: nginx
-          resources: {}
-      restartPolicy: Always
-status: {}
-
----
-apiVersion: networking.k8s.io/v1
-kind: NetworkPolicy
-metadata:
-  creationTimestamp: null
-  name: custom-build-push-web
-spec:
-  ingress:
-    - from:
-        - podSelector:
-            matchLabels:
-              io.kompose.network/custom-build-push-web: "true"
-  podSelector:
-    matchLabels:
-      io.kompose.network/custom-build-push-web: "true"
-
diff --git a/script/test/fixtures/deploy/placement/output-placement-k8s.yaml b/script/test/fixtures/deploy/placement/output-placement-k8s.yaml
index 46e5db6c..8005d35e 100644
--- a/script/test/fixtures/deploy/placement/output-placement-k8s.yaml
+++ b/script/test/fixtures/deploy/placement/output-placement-k8s.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   ports:
     - name: "6379"
@@ -25,7 +24,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
diff --git a/script/test/fixtures/deploy/placement/output-placement-os.yaml b/script/test/fixtures/deploy/placement/output-placement-os.yaml
index 98e9958a..d59f6b4f 100644
--- a/script/test/fixtures/deploy/placement/output-placement-os.yaml
+++ b/script/test/fixtures/deploy/placement/output-placement-os.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   ports:
     - name: "6379"
@@ -25,7 +24,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -104,7 +102,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/env-multiple/docker-compose.yml b/script/test/fixtures/env-multiple/docker-compose.yml
new file mode 100644
index 00000000..62d808af
--- /dev/null
+++ b/script/test/fixtures/env-multiple/docker-compose.yml
@@ -0,0 +1,18 @@
+version: '3'
+services:
+  namenode:
+    image: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8
+    environment:
+      - CLUSTER_NAME=test
+    env_file:
+      - env1/hadoop-hive-namenode.env
+    ports:
+      - "50070:50070"
+      - "8020:8020"
+  another-namenode:
+    image: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8
+    ports:
+      - "50070:50070"
+      - "8020:8020"
+    env_file:
+      - env2/hadoop-hive-namenode.env
diff --git a/script/test/fixtures/env-multiple/env1/hadoop-hive-namenode.env b/script/test/fixtures/env-multiple/env1/hadoop-hive-namenode.env
new file mode 100644
index 00000000..6ac867af
--- /dev/null
+++ b/script/test/fixtures/env-multiple/env1/hadoop-hive-namenode.env
@@ -0,0 +1,1 @@
+FOO=BAR
diff --git a/script/test/fixtures/env-multiple/env2/hadoop-hive-namenode.env b/script/test/fixtures/env-multiple/env2/hadoop-hive-namenode.env
new file mode 100644
index 00000000..9279e277
--- /dev/null
+++ b/script/test/fixtures/env-multiple/env2/hadoop-hive-namenode.env
@@ -0,0 +1,1 @@
+BAR=FOO
diff --git a/script/test/fixtures/env-multiple/output-k8s.yaml b/script/test/fixtures/env-multiple/output-k8s.yaml
new file mode 100644
index 00000000..d61ada19
--- /dev/null
+++ b/script/test/fixtures/env-multiple/output-k8s.yaml
@@ -0,0 +1,148 @@
+---
+apiVersion: v1
+kind: Service
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: another-namenode
+  name: another-namenode
+spec:
+  ports:
+    - name: "50070"
+      port: 50070
+      targetPort: 50070
+    - name: "8020"
+      port: 8020
+      targetPort: 8020
+  selector:
+    io.kompose.service: another-namenode
+status:
+  loadBalancer: {}
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: namenode
+  name: namenode
+spec:
+  ports:
+    - name: "50070"
+      port: 50070
+      targetPort: 50070
+    - name: "8020"
+      port: 8020
+      targetPort: 8020
+  selector:
+    io.kompose.service: namenode
+status:
+  loadBalancer: {}
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: another-namenode
+  name: another-namenode
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      io.kompose.service: another-namenode
+  strategy: {}
+  template:
+    metadata:
+      creationTimestamp: null
+      labels:
+        io.kompose.network/env-default: "true"
+        io.kompose.service: another-namenode
+    spec:
+      containers:
+        - env:
+            - name: BAR
+              valueFrom:
+                configMapKeyRef:
+                  key: BAR
+                  name: hadoop-hive-namenode-env
+          image: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8
+          name: another-namenode
+          ports:
+            - containerPort: 50070
+              hostPort: 50070
+              protocol: TCP
+            - containerPort: 8020
+              hostPort: 8020
+              protocol: TCP
+          resources: {}
+      restartPolicy: Always
+status: {}
+
+---
+apiVersion: v1
+data:
+  FOO: BAR
+kind: ConfigMap
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: hadoop-hive-namenode-env
+  name: hadoop-hive-namenode-env
+
+---
+apiVersion: v1
+data:
+  BAR: FOO
+kind: ConfigMap
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: another-namenode-hadoop-hive-namenode-env
+  name: hadoop-hive-namenode-env1
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: namenode
+  name: namenode
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      io.kompose.service: namenode
+  strategy: {}
+  template:
+    metadata:
+      creationTimestamp: null
+      labels:
+        io.kompose.network/env-default: "true"
+        io.kompose.service: namenode
+    spec:
+      containers:
+        - env:
+            - name: CLUSTER_NAME
+              value: test
+            - name: FOO
+              valueFrom:
+                configMapKeyRef:
+                  key: FOO
+                  name: hadoop-hive-namenode-env
+          image: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8
+          name: namenode
+          ports:
+            - containerPort: 50070
+              hostPort: 50070
+              protocol: TCP
+            - containerPort: 8020
+              hostPort: 8020
+              protocol: TCP
+          resources: {}
+      restartPolicy: Always
+status: {}
+
diff --git a/script/test/fixtures/env-multiple/output-os.yaml b/script/test/fixtures/env-multiple/output-os.yaml
new file mode 100644
index 00000000..57c42676
--- /dev/null
+++ b/script/test/fixtures/env-multiple/output-os.yaml
@@ -0,0 +1,230 @@
+---
+apiVersion: v1
+kind: Service
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: another-namenode
+  name: another-namenode
+spec:
+  ports:
+    - name: "50070"
+      port: 50070
+      targetPort: 50070
+    - name: "8020"
+      port: 8020
+      targetPort: 8020
+  selector:
+    io.kompose.service: another-namenode
+status:
+  loadBalancer: {}
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: namenode
+  name: namenode
+spec:
+  ports:
+    - name: "50070"
+      port: 50070
+      targetPort: 50070
+    - name: "8020"
+      port: 8020
+      targetPort: 8020
+  selector:
+    io.kompose.service: namenode
+status:
+  loadBalancer: {}
+
+---
+apiVersion: v1
+data:
+  FOO: BAR
+kind: ConfigMap
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: hadoop-hive-namenode-env
+  name: hadoop-hive-namenode-env
+
+---
+apiVersion: v1
+data:
+  BAR: FOO
+kind: ConfigMap
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: another-namenode-hadoop-hive-namenode-env
+  name: hadoop-hive-namenode-env1
+
+---
+apiVersion: apps.openshift.io/v1
+kind: DeploymentConfig
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: another-namenode
+  name: another-namenode
+spec:
+  replicas: 1
+  selector:
+    io.kompose.service: another-namenode
+  strategy:
+    resources: {}
+  template:
+    metadata:
+      creationTimestamp: null
+      labels:
+        io.kompose.network/env-default: "true"
+        io.kompose.service: another-namenode
+    spec:
+      containers:
+        - env:
+            - name: BAR
+              valueFrom:
+                configMapKeyRef:
+                  key: BAR
+                  name: hadoop-hive-namenode-env1
+          image: ' '
+          name: another-namenode
+          ports:
+            - containerPort: 50070
+              hostPort: 50070
+              protocol: TCP
+            - containerPort: 8020
+              hostPort: 8020
+              protocol: TCP
+          resources: {}
+      restartPolicy: Always
+  test: false
+  triggers:
+    - type: ConfigChange
+    - imageChangeParams:
+        automatic: true
+        containerNames:
+          - another-namenode
+        from:
+          kind: ImageStreamTag
+          name: another-namenode:2.0.0-hadoop2.7.4-java8
+      type: ImageChange
+status:
+  availableReplicas: 0
+  latestVersion: 0
+  observedGeneration: 0
+  replicas: 0
+  unavailableReplicas: 0
+  updatedReplicas: 0
+
+---
+apiVersion: image.openshift.io/v1
+kind: ImageStream
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: another-namenode
+  name: another-namenode
+spec:
+  lookupPolicy:
+    local: false
+  tags:
+    - annotations: null
+      from:
+        kind: DockerImage
+        name: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8
+      generation: null
+      importPolicy: {}
+      name: 2.0.0-hadoop2.7.4-java8
+      referencePolicy:
+        type: ""
+status:
+  dockerImageRepository: ""
+
+---
+apiVersion: apps.openshift.io/v1
+kind: DeploymentConfig
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: namenode
+  name: namenode
+spec:
+  replicas: 1
+  selector:
+    io.kompose.service: namenode
+  strategy:
+    resources: {}
+  template:
+    metadata:
+      creationTimestamp: null
+      labels:
+        io.kompose.network/env-default: "true"
+        io.kompose.service: namenode
+    spec:
+      containers:
+        - env:
+            - name: CLUSTER_NAME
+              value: test
+            - name: FOO
+              valueFrom:
+                configMapKeyRef:
+                  key: FOO
+                  name: hadoop-hive-namenode-env
+          image: ' '
+          name: namenode
+          ports:
+            - containerPort: 50070
+              hostPort: 50070
+              protocol: TCP
+            - containerPort: 8020
+              hostPort: 8020
+              protocol: TCP
+          resources: {}
+      restartPolicy: Always
+  test: false
+  triggers:
+    - type: ConfigChange
+    - imageChangeParams:
+        automatic: true
+        containerNames:
+          - namenode
+        from:
+          kind: ImageStreamTag
+          name: namenode:2.0.0-hadoop2.7.4-java8
+      type: ImageChange
+status:
+  availableReplicas: 0
+  latestVersion: 0
+  observedGeneration: 0
+  replicas: 0
+  unavailableReplicas: 0
+  updatedReplicas: 0
+
+---
+apiVersion: image.openshift.io/v1
+kind: ImageStream
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: namenode
+  name: namenode
+spec:
+  lookupPolicy:
+    local: false
+  tags:
+    - annotations: null
+      from:
+        kind: DockerImage
+        name: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8
+      generation: null
+      importPolicy: {}
+      name: 2.0.0-hadoop2.7.4-java8
+      referencePolicy:
+        type: ""
+status:
+  dockerImageRepository: ""
+
diff --git a/script/test/fixtures/env/docker-compose.yml b/script/test/fixtures/env/docker-compose.yml
index 8d989dee..bc80f225 100644
--- a/script/test/fixtures/env/docker-compose.yml
+++ b/script/test/fixtures/env/docker-compose.yml
@@ -11,5 +11,8 @@ services:
       - "8020:8020"
   another-namenode:
     image: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8
+    ports:
+      - "50070:50070"
+      - "8020:8020"
     env_file:
       - hadoop-hive-namenode.env
diff --git a/script/test/fixtures/env/output-k8s.yaml b/script/test/fixtures/env/output-k8s.yaml
index a885df99..f53119da 100644
--- a/script/test/fixtures/env/output-k8s.yaml
+++ b/script/test/fixtures/env/output-k8s.yaml
@@ -1,3 +1,24 @@
+---
+apiVersion: v1
+kind: Service
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: another-namenode
+  name: another-namenode
+spec:
+  ports:
+    - name: "50070"
+      port: 50070
+      targetPort: 50070
+    - name: "8020"
+      port: 8020
+      targetPort: 8020
+  selector:
+    io.kompose.service: another-namenode
+status:
+  loadBalancer: {}
+
 ---
 apiVersion: v1
 kind: Service
@@ -6,7 +27,6 @@ metadata:
   labels:
     io.kompose.service: namenode
   name: namenode
-  namespace: default
 spec:
   ports:
     - name: "50070"
@@ -28,7 +48,6 @@ metadata:
   labels:
     io.kompose.service: another-namenode
   name: another-namenode
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -48,14 +67,21 @@ spec:
               valueFrom:
                 configMapKeyRef:
                   key: BAR
-                  name: home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
+                  name: hadoop-hive-namenode-env
             - name: FOO
               valueFrom:
                 configMapKeyRef:
                   key: FOO
-                  name: home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
+                  name: hadoop-hive-namenode-env
           image: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8
           name: another-namenode
+          ports:
+            - containerPort: 50070
+              hostPort: 50070
+              protocol: TCP
+            - containerPort: 8020
+              hostPort: 8020
+              protocol: TCP
           resources: {}
       restartPolicy: Always
 status: {}
@@ -69,9 +95,8 @@ kind: ConfigMap
 metadata:
   creationTimestamp: null
   labels:
-    io.kompose.service: another-namenode-home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
-  name: home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
-  namespace: default
+    io.kompose.service: another-namenode-hadoop-hive-namenode-env
+  name: hadoop-hive-namenode-env
 
 ---
 apiVersion: apps/v1
@@ -81,7 +106,6 @@ metadata:
   labels:
     io.kompose.service: namenode
   name: namenode
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -101,14 +125,14 @@ spec:
               valueFrom:
                 configMapKeyRef:
                   key: BAR
-                  name: home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
+                  name: hadoop-hive-namenode-env
             - name: CLUSTER_NAME
               value: test
             - name: FOO
               valueFrom:
                 configMapKeyRef:
                   key: FOO
-                  name: home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
+                  name: hadoop-hive-namenode-env
           image: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8
           name: namenode
           ports:
diff --git a/script/test/fixtures/env/output-os.yaml b/script/test/fixtures/env/output-os.yaml
index 8537d2be..487b5710 100644
--- a/script/test/fixtures/env/output-os.yaml
+++ b/script/test/fixtures/env/output-os.yaml
@@ -1,3 +1,24 @@
+---
+apiVersion: v1
+kind: Service
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: another-namenode
+  name: another-namenode
+spec:
+  ports:
+    - name: "50070"
+      port: 50070
+      targetPort: 50070
+    - name: "8020"
+      port: 8020
+      targetPort: 8020
+  selector:
+    io.kompose.service: another-namenode
+status:
+  loadBalancer: {}
+
 ---
 apiVersion: v1
 kind: Service
@@ -6,7 +27,6 @@ metadata:
   labels:
     io.kompose.service: namenode
   name: namenode
-  namespace: default
 spec:
   ports:
     - name: "50070"
@@ -29,9 +49,8 @@ kind: ConfigMap
 metadata:
   creationTimestamp: null
   labels:
-    io.kompose.service: another-namenode-home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
-  name: home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
-  namespace: default
+    io.kompose.service: another-namenode-hadoop-hive-namenode-env
+  name: hadoop-hive-namenode-env
 
 ---
 apiVersion: apps.openshift.io/v1
@@ -41,7 +60,6 @@ metadata:
   labels:
     io.kompose.service: another-namenode
   name: another-namenode
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -61,14 +79,21 @@ spec:
               valueFrom:
                 configMapKeyRef:
                   key: BAR
-                  name: home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
+                  name: hadoop-hive-namenode-env
             - name: FOO
               valueFrom:
                 configMapKeyRef:
                   key: FOO
-                  name: home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
+                  name: hadoop-hive-namenode-env
           image: ' '
           name: another-namenode
+          ports:
+            - containerPort: 50070
+              hostPort: 50070
+              protocol: TCP
+            - containerPort: 8020
+              hostPort: 8020
+              protocol: TCP
           resources: {}
       restartPolicy: Always
   test: false
@@ -98,7 +123,6 @@ metadata:
   labels:
     io.kompose.service: another-namenode
   name: another-namenode
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -123,7 +147,6 @@ metadata:
   labels:
     io.kompose.service: namenode
   name: namenode
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -143,14 +166,14 @@ spec:
               valueFrom:
                 configMapKeyRef:
                   key: BAR
-                  name: home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
+                  name: hadoop-hive-namenode-env
             - name: CLUSTER_NAME
               value: test
             - name: FOO
               valueFrom:
                 configMapKeyRef:
                   key: FOO
-                  name: home-runner-work-kompose-kompose-script-test-fixtures-env-hadoop-hive-namenode-env
+                  name: hadoop-hive-namenode-env
           image: ' '
           name: namenode
           ports:
@@ -189,7 +212,6 @@ metadata:
   labels:
     io.kompose.service: namenode
   name: namenode
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/envvars-interpolation/output-k8s.yaml b/script/test/fixtures/envvars-interpolation/output-k8s.yaml
index 9a58466d..d9ccbd06 100644
--- a/script/test/fixtures/envvars-interpolation/output-k8s.yaml
+++ b/script/test/fixtures/envvars-interpolation/output-k8s.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: myservice
   name: myservice
-  namespace: default
 spec:
   replicas: 1
   selector:
diff --git a/script/test/fixtures/envvars-interpolation/output-os.yaml b/script/test/fixtures/envvars-interpolation/output-os.yaml
index 3460a655..f2113d65 100644
--- a/script/test/fixtures/envvars-interpolation/output-os.yaml
+++ b/script/test/fixtures/envvars-interpolation/output-os.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: myservice
   name: myservice
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -60,7 +59,6 @@ metadata:
   labels:
     io.kompose.service: myservice
   name: myservice
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/expose/output-k8s.yaml b/script/test/fixtures/expose/output-k8s.yaml
index 2f2311c1..52ad4c7d 100644
--- a/script/test/fixtures/expose/output-k8s.yaml
+++ b/script/test/fixtures/expose/output-k8s.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   ports:
     - name: "6379"
@@ -29,7 +28,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   ports:
     - name: "5000"
@@ -48,7 +46,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -84,7 +81,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -125,7 +121,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   ingressClassName: nginx
   rules:
diff --git a/script/test/fixtures/expose/output-os.yaml b/script/test/fixtures/expose/output-os.yaml
index d117874d..149ceab4 100644
--- a/script/test/fixtures/expose/output-os.yaml
+++ b/script/test/fixtures/expose/output-os.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   ports:
     - name: "6379"
@@ -29,7 +28,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   ports:
     - name: "5000"
@@ -48,7 +46,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -97,7 +94,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -126,7 +122,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -176,7 +171,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -201,7 +195,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   host: batman.example.com/dev,batwoman.example.com
   port:
diff --git a/script/test/fixtures/external-traffic-policy/output-k8s-v1.yaml b/script/test/fixtures/external-traffic-policy/output-k8s-v1.yaml
index b5f9a93f..aabc5a9a 100644
--- a/script/test/fixtures/external-traffic-policy/output-k8s-v1.yaml
+++ b/script/test/fixtures/external-traffic-policy/output-k8s-v1.yaml
@@ -11,7 +11,6 @@ metadata:
   labels:
     io.kompose.service: front-end-tcp
   name: front-end-tcp
-  namespace: default
 spec:
   externalTrafficPolicy: Local
   ports:
@@ -37,7 +36,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   replicas: 1
   selector:
diff --git a/script/test/fixtures/external-traffic-policy/output-k8s-v2.yaml b/script/test/fixtures/external-traffic-policy/output-k8s-v2.yaml
index 656c7c07..391e21bb 100644
--- a/script/test/fixtures/external-traffic-policy/output-k8s-v2.yaml
+++ b/script/test/fixtures/external-traffic-policy/output-k8s-v2.yaml
@@ -11,7 +11,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   clusterIP: None
   ports:
@@ -37,7 +36,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -83,7 +81,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   ingressClassName: nginx
   rules:
diff --git a/script/test/fixtures/external-traffic-policy/output-os-v1.yaml b/script/test/fixtures/external-traffic-policy/output-os-v1.yaml
index 09471152..6ce6a5df 100644
--- a/script/test/fixtures/external-traffic-policy/output-os-v1.yaml
+++ b/script/test/fixtures/external-traffic-policy/output-os-v1.yaml
@@ -11,7 +11,6 @@ metadata:
   labels:
     io.kompose.service: front-end-tcp
   name: front-end-tcp
-  namespace: default
 spec:
   externalTrafficPolicy: Local
   ports:
@@ -37,7 +36,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -90,7 +88,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/external-traffic-policy/output-os-v2.yaml b/script/test/fixtures/external-traffic-policy/output-os-v2.yaml
index bcf80f57..49f64791 100644
--- a/script/test/fixtures/external-traffic-policy/output-os-v2.yaml
+++ b/script/test/fixtures/external-traffic-policy/output-os-v2.yaml
@@ -11,7 +11,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   clusterIP: None
   ports:
@@ -37,7 +36,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -90,7 +88,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -115,7 +112,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   host: lb
   port:
diff --git a/script/test/fixtures/fsgroup/output-k8s.yaml b/script/test/fixtures/fsgroup/output-k8s.yaml
index 95ad09ef..51ad5d6d 100644
--- a/script/test/fixtures/fsgroup/output-k8s.yaml
+++ b/script/test/fixtures/fsgroup/output-k8s.yaml
@@ -60,20 +60,3 @@ spec:
     requests:
       storage: 100Mi
 status: {}
-
----
-apiVersion: networking.k8s.io/v1
-kind: NetworkPolicy
-metadata:
-  creationTimestamp: null
-  name: fsgroup-default
-spec:
-  ingress:
-    - from:
-        - podSelector:
-            matchLabels:
-              io.kompose.network/fsgroup-default: "true"
-  podSelector:
-    matchLabels:
-      io.kompose.network/fsgroup-default: "true"
-
diff --git a/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml b/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml
index 91df90fc..8078a2cb 100644
--- a/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml
+++ b/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml
@@ -66,4 +66,4 @@ services:
       kompose.service.healthcheck.readiness.tcp_port: 9091
       kompose.service.healthcheck.readiness.interval: 11s
       kompose.service.healthcheck.readiness.timeout: 2s
-      kompose.service.healthcheck.readiness.retries: 6
\ No newline at end of file
+      kompose.service.healthcheck.readiness.retries: 6
diff --git a/script/test/fixtures/healthcheck/output-healthcheck-k8s.yaml b/script/test/fixtures/healthcheck/output-healthcheck-k8s.yaml
index 55ba111b..9c8115a1 100644
--- a/script/test/fixtures/healthcheck/output-healthcheck-k8s.yaml
+++ b/script/test/fixtures/healthcheck/output-healthcheck-k8s.yaml
@@ -11,16 +11,15 @@ metadata:
     kompose.service.healthcheck.readiness.timeout: 1s
   creationTimestamp: null
   labels:
-    io.kompose.service: my-group
+    io.kompose.service: mongo
   name: mongo
-  namespace: default
 spec:
   ports:
     - name: "27017"
       port: 27017
       targetPort: 27017
   selector:
-    io.kompose.service: my-group
+    io.kompose.service: mongo
 status:
   loadBalancer: {}
 
@@ -37,16 +36,15 @@ metadata:
     kompose.service.healthcheck.readiness.timeout: 2s
   creationTimestamp: null
   labels:
-    io.kompose.service: my-group
+    io.kompose.service: mysql
   name: mysql
-  namespace: default
 spec:
   ports:
     - name: "3306"
       port: 3306
       targetPort: 3306
   selector:
-    io.kompose.service: my-group
+    io.kompose.service: mysql
 status:
   loadBalancer: {}
 
@@ -66,7 +64,6 @@ metadata:
   labels:
     io.kompose.service: postgresql
   name: postgresql
-  namespace: default
 spec:
   ports:
     - name: "5432"
@@ -90,7 +87,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   ports:
     - name: "6379"
@@ -107,21 +103,20 @@ kind: Deployment
 metadata:
   annotations:
     kompose.service.group: my-group
-    kompose.service.healthcheck.liveness.tcp_port: "8081"
-    kompose.service.healthcheck.readiness.interval: 11s
-    kompose.service.healthcheck.readiness.retries: "6"
-    kompose.service.healthcheck.readiness.tcp_port: "9091"
-    kompose.service.healthcheck.readiness.timeout: 2s
+    kompose.service.healthcheck.liveness.tcp_port: "8080"
+    kompose.service.healthcheck.readiness.interval: 10s
+    kompose.service.healthcheck.readiness.retries: "5"
+    kompose.service.healthcheck.readiness.tcp_port: "9090"
+    kompose.service.healthcheck.readiness.timeout: 1s
   creationTimestamp: null
   labels:
-    io.kompose.service: my-group
-  name: my-group
-  namespace: default
+    io.kompose.service: mongo
+  name: mongo
 spec:
   replicas: 1
   selector:
     matchLabels:
-      io.kompose.service: my-group
+      io.kompose.service: mongo
   strategy: {}
   template:
     metadata:
@@ -135,7 +130,7 @@ spec:
       creationTimestamp: null
       labels:
         io.kompose.network/healthcheck-default: "true"
-        io.kompose.service: my-group
+        io.kompose.service: mongo
     spec:
       containers:
         - image: mongo
@@ -156,6 +151,45 @@ spec:
               port: 9090
             timeoutSeconds: 1
           resources: {}
+      restartPolicy: Always
+status: {}
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  annotations:
+    kompose.service.group: my-group
+    kompose.service.healthcheck.liveness.tcp_port: "8081"
+    kompose.service.healthcheck.readiness.interval: 11s
+    kompose.service.healthcheck.readiness.retries: "6"
+    kompose.service.healthcheck.readiness.tcp_port: "9091"
+    kompose.service.healthcheck.readiness.timeout: 2s
+  creationTimestamp: null
+  labels:
+    io.kompose.service: mysql
+  name: mysql
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      io.kompose.service: mysql
+  strategy: {}
+  template:
+    metadata:
+      annotations:
+        kompose.service.group: my-group
+        kompose.service.healthcheck.liveness.tcp_port: "8081"
+        kompose.service.healthcheck.readiness.interval: 11s
+        kompose.service.healthcheck.readiness.retries: "6"
+        kompose.service.healthcheck.readiness.tcp_port: "9091"
+        kompose.service.healthcheck.readiness.timeout: 2s
+      creationTimestamp: null
+      labels:
+        io.kompose.network/healthcheck-default: "true"
+        io.kompose.service: mysql
+    spec:
+      containers:
         - image: mysql
           livenessProbe:
             failureThreshold: 6
@@ -193,7 +227,6 @@ metadata:
   labels:
     io.kompose.service: postgresql
   name: postgresql
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -252,7 +285,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
diff --git a/script/test/fixtures/healthcheck/output-healthcheck-os.yaml b/script/test/fixtures/healthcheck/output-healthcheck-os.yaml
index 3207559b..a4a29a6b 100644
--- a/script/test/fixtures/healthcheck/output-healthcheck-os.yaml
+++ b/script/test/fixtures/healthcheck/output-healthcheck-os.yaml
@@ -13,7 +13,6 @@ metadata:
   labels:
     io.kompose.service: mongo
   name: mongo
-  namespace: default
 spec:
   ports:
     - name: "27017"
@@ -39,7 +38,6 @@ metadata:
   labels:
     io.kompose.service: mysql
   name: mysql
-  namespace: default
 spec:
   ports:
     - name: "3306"
@@ -66,7 +64,6 @@ metadata:
   labels:
     io.kompose.service: postgresql
   name: postgresql
-  namespace: default
 spec:
   ports:
     - name: "5432"
@@ -90,7 +87,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   ports:
     - name: "6379"
@@ -116,7 +112,6 @@ metadata:
   labels:
     io.kompose.service: mongo
   name: mongo
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -177,7 +172,6 @@ metadata:
   labels:
     io.kompose.service: mongo
   name: mongo
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -209,7 +203,6 @@ metadata:
   labels:
     io.kompose.service: mysql
   name: mysql
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -270,7 +263,6 @@ metadata:
   labels:
     io.kompose.service: mysql
   name: mysql
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -303,7 +295,6 @@ metadata:
   labels:
     io.kompose.service: postgresql
   name: postgresql
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -366,7 +357,6 @@ metadata:
   labels:
     io.kompose.service: postgresql
   name: postgresql
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -396,7 +386,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -460,7 +449,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/host-port-protocol/output-k8s.yaml b/script/test/fixtures/host-port-protocol/output-k8s.yaml
index 32b1f5c7..8af386f1 100644
--- a/script/test/fixtures/host-port-protocol/output-k8s.yaml
+++ b/script/test/fixtures/host-port-protocol/output-k8s.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: nginx
   name: nginx
-  namespace: default
 spec:
   ports:
     - name: "80"
@@ -25,7 +24,6 @@ metadata:
   labels:
     io.kompose.service: nginx
   name: nginx
-  namespace: default
 spec:
   replicas: 1
   selector:
diff --git a/script/test/fixtures/host-port-protocol/output-os.yaml b/script/test/fixtures/host-port-protocol/output-os.yaml
index 3432f5c6..e1659373 100644
--- a/script/test/fixtures/host-port-protocol/output-os.yaml
+++ b/script/test/fixtures/host-port-protocol/output-os.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: nginx
   name: nginx
-  namespace: default
 spec:
   ports:
     - name: "80"
@@ -25,7 +24,6 @@ metadata:
   labels:
     io.kompose.service: nginx
   name: nginx
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -75,7 +73,6 @@ metadata:
   labels:
     io.kompose.service: nginx
   name: nginx
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/multiple-files/output-k8s.yaml b/script/test/fixtures/multiple-files/output-k8s.yaml
index 2934ed6d..165a54c8 100644
--- a/script/test/fixtures/multiple-files/output-k8s.yaml
+++ b/script/test/fixtures/multiple-files/output-k8s.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: bar
   name: bar
-  namespace: default
 spec:
   replicas: 99
   selector:
@@ -35,7 +34,6 @@ metadata:
   labels:
     io.kompose.service: foo
   name: foo
-  namespace: default
 spec:
   replicas: 3
   selector:
diff --git a/script/test/fixtures/multiple-files/output-os.yaml b/script/test/fixtures/multiple-files/output-os.yaml
index ca69f76c..d673d065 100644
--- a/script/test/fixtures/multiple-files/output-os.yaml
+++ b/script/test/fixtures/multiple-files/output-os.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: bar
   name: bar
-  namespace: default
 spec:
   replicas: 99
   selector:
@@ -52,7 +51,6 @@ metadata:
   labels:
     io.kompose.service: bar
   name: bar
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -77,7 +75,6 @@ metadata:
   labels:
     io.kompose.service: foo
   name: foo
-  namespace: default
 spec:
   replicas: 3
   selector:
@@ -123,7 +120,6 @@ metadata:
   labels:
     io.kompose.service: foo
   name: foo
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/multiple-type-volumes/output-k8s.yaml b/script/test/fixtures/multiple-type-volumes/output-k8s.yaml
index a67801bc..40690d2a 100644
--- a/script/test/fixtures/multiple-type-volumes/output-k8s.yaml
+++ b/script/test/fixtures/multiple-type-volumes/output-k8s.yaml
@@ -8,7 +8,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -47,7 +46,6 @@ metadata:
   labels:
     io.kompose.service: db-data
   name: db-data
-  namespace: default
 spec:
   accessModes:
     - ReadWriteOnce
@@ -66,7 +64,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -117,7 +114,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm0
-  namespace: default
 
 ---
 apiVersion: v1
@@ -131,5 +127,4 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm1
-  namespace: default
 
diff --git a/script/test/fixtures/multiple-type-volumes/output-os.yaml b/script/test/fixtures/multiple-type-volumes/output-os.yaml
index 51981c7b..9a4c7b76 100644
--- a/script/test/fixtures/multiple-type-volumes/output-os.yaml
+++ b/script/test/fixtures/multiple-type-volumes/output-os.yaml
@@ -8,7 +8,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -62,7 +61,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -87,7 +85,6 @@ metadata:
   labels:
     io.kompose.service: db-data
   name: db-data
-  namespace: default
 spec:
   accessModes:
     - ReadWriteOnce
@@ -106,7 +103,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -169,7 +165,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -197,7 +192,6 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm0
-  namespace: default
 
 ---
 apiVersion: v1
@@ -211,5 +205,4 @@ metadata:
   labels:
     io.kompose.service: web
   name: web-cm1
-  namespace: default
 
diff --git a/script/test/fixtures/network-policies/docker-compose.yaml b/script/test/fixtures/network-policies/docker-compose.yaml
index 8b24f656..2630f699 100644
--- a/script/test/fixtures/network-policies/docker-compose.yaml
+++ b/script/test/fixtures/network-policies/docker-compose.yaml
@@ -6,5 +6,7 @@ networks:
 services:
   nginx:
     image: nginx
-    networks: 
+    ports:
+      - 80:80
+    networks:
     - web
diff --git a/script/test/fixtures/network-policies/output-k8s.yaml b/script/test/fixtures/network-policies/output-k8s.yaml
index 049edeab..8dbca2cc 100644
--- a/script/test/fixtures/network-policies/output-k8s.yaml
+++ b/script/test/fixtures/network-policies/output-k8s.yaml
@@ -1,3 +1,21 @@
+---
+apiVersion: v1
+kind: Service
+metadata:
+  creationTimestamp: null
+  labels:
+    io.kompose.service: nginx
+  name: nginx
+spec:
+  ports:
+    - name: "80"
+      port: 80
+      targetPort: 80
+  selector:
+    io.kompose.service: nginx
+status:
+  loadBalancer: {}
+
 ---
 apiVersion: apps/v1
 kind: Deployment
@@ -22,6 +40,10 @@ spec:
       containers:
         - image: nginx
           name: nginx
+          ports:
+            - containerPort: 80
+              hostPort: 80
+              protocol: TCP
           resources: {}
       restartPolicy: Always
 status: {}
diff --git a/script/test/fixtures/read-only/output-k8s.yaml b/script/test/fixtures/read-only/output-k8s.yaml
index 7d7d3fbf..d18582fd 100644
--- a/script/test/fixtures/read-only/output-k8s.yaml
+++ b/script/test/fixtures/read-only/output-k8s.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: test
   name: test
-  namespace: default
 spec:
   ports:
     - name: "80"
@@ -25,7 +24,6 @@ metadata:
   labels:
     io.kompose.service: test
   name: test
-  namespace: default
 spec:
   replicas: 1
   selector:
diff --git a/script/test/fixtures/read-only/output-os.yaml b/script/test/fixtures/read-only/output-os.yaml
index 876ce92a..40cc310e 100644
--- a/script/test/fixtures/read-only/output-os.yaml
+++ b/script/test/fixtures/read-only/output-os.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: test
   name: test
-  namespace: default
 spec:
   ports:
     - name: "80"
@@ -25,7 +24,6 @@ metadata:
   labels:
     io.kompose.service: test
   name: test
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -77,7 +75,6 @@ metadata:
   labels:
     io.kompose.service: test
   name: test
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/service-group/output-k8s.yaml b/script/test/fixtures/service-group/output-k8s.yaml
index a639d78e..57929661 100644
--- a/script/test/fixtures/service-group/output-k8s.yaml
+++ b/script/test/fixtures/service-group/output-k8s.yaml
@@ -4,16 +4,15 @@ kind: Service
 metadata:
   creationTimestamp: null
   labels:
-    io.kompose.service: dispatcher-librenms
+    io.kompose.service: librenms-dispatcher
   name: librenms
-  namespace: default
 spec:
   ports:
     - name: "8000"
       port: 8000
       targetPort: 8000
   selector:
-    io.kompose.service: dispatcher-librenms
+    io.kompose.service: librenms-dispatcher
 status:
   loadBalancer: {}
 
@@ -23,14 +22,13 @@ kind: Deployment
 metadata:
   creationTimestamp: null
   labels:
-    io.kompose.service: dispatcher-librenms
-  name: dispatcher-librenms
-  namespace: default
+    io.kompose.service: librenms-dispatcher
+  name: librenms-dispatcher
 spec:
   replicas: 1
   selector:
     matchLabels:
-      io.kompose.service: dispatcher-librenms
+      io.kompose.service: librenms-dispatcher
   strategy:
     type: Recreate
   template:
@@ -38,7 +36,7 @@ spec:
       creationTimestamp: null
       labels:
         io.kompose.network/service-group-default: "true"
-        io.kompose.service: dispatcher-librenms
+        io.kompose.service: librenms-dispatcher
     spec:
       containers:
         - env:
@@ -48,7 +46,7 @@ spec:
           resources: {}
           volumeMounts:
             - mountPath: /data
-              name: dispatcher-librenms-claim0
+              name: librenms-dispatcher-claim0
         - env:
             - name: TZ
           image: librenms/librenms:latest
@@ -60,13 +58,13 @@ spec:
           resources: {}
           volumeMounts:
             - mountPath: /data
-              name: dispatcher-librenms-claim0
+              name: librenms-dispatcher-claim0
       hostname: librenms
       restartPolicy: Always
       volumes:
-        - name: dispatcher-librenms-claim0
+        - name: librenms-dispatcher-claim0
           persistentVolumeClaim:
-            claimName: dispatcher-librenms-claim0
+            claimName: librenms-dispatcher-claim0
 status: {}
 
 ---
@@ -75,9 +73,8 @@ kind: PersistentVolumeClaim
 metadata:
   creationTimestamp: null
   labels:
-    io.kompose.service: dispatcher-librenms-claim0
-  name: dispatcher-librenms-claim0
-  namespace: default
+    io.kompose.service: librenms-dispatcher-claim0
+  name: librenms-dispatcher-claim0
 spec:
   accessModes:
     - ReadWriteOnce
diff --git a/script/test/fixtures/single-file-output/output-k8s.yaml b/script/test/fixtures/single-file-output/output-k8s.yaml
index d1e5dd28..39835492 100644
--- a/script/test/fixtures/single-file-output/output-k8s.yaml
+++ b/script/test/fixtures/single-file-output/output-k8s.yaml
@@ -9,7 +9,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front_end
-  namespace: default
 spec:
   ports:
     - name: "80"
@@ -31,7 +30,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -73,7 +71,6 @@ metadata:
   labels:
     io.kompose.service: front-end
   name: front-end
-  namespace: default
 spec:
   ingressClassName: nginx
   rules:
diff --git a/script/test/fixtures/statefulset/output-k8s.yaml b/script/test/fixtures/statefulset/output-k8s.yaml
index fcdae4d7..7172545e 100644
--- a/script/test/fixtures/statefulset/output-k8s.yaml
+++ b/script/test/fixtures/statefulset/output-k8s.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   clusterIP: None
   ports:
@@ -27,7 +26,6 @@ metadata:
   labels:
     io.kompose.service: wordpress
   name: wordpress
-  namespace: default
 spec:
   clusterIP: None
   ports:
@@ -48,7 +46,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -109,7 +106,6 @@ metadata:
   labels:
     io.kompose.service: wordpress
   name: wordpress
-  namespace: default
 spec:
   replicas: 1
   selector:
diff --git a/script/test/fixtures/statefulset/output-os.yaml b/script/test/fixtures/statefulset/output-os.yaml
index bfe80aff..b3664bd2 100644
--- a/script/test/fixtures/statefulset/output-os.yaml
+++ b/script/test/fixtures/statefulset/output-os.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   ports:
     - name: "3306"
@@ -25,7 +24,6 @@ metadata:
   labels:
     io.kompose.service: wordpress
   name: wordpress
-  namespace: default
 spec:
   ports:
     - name: "8000"
@@ -44,7 +42,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -105,7 +102,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -168,7 +164,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -193,7 +188,6 @@ metadata:
   labels:
     io.kompose.service: wordpress
   name: wordpress
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -254,7 +248,6 @@ metadata:
   labels:
     io.kompose.service: wordpress
   name: wordpress
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -317,7 +310,6 @@ metadata:
   labels:
     io.kompose.service: wordpress
   name: wordpress
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/v2/output-k8s.yaml b/script/test/fixtures/v2/output-k8s.yaml
index 3a9c0a3d..714375d2 100644
--- a/script/test/fixtures/v2/output-k8s.yaml
+++ b/script/test/fixtures/v2/output-k8s.yaml
@@ -234,22 +234,6 @@ spec:
       - 1234
 status: {}
 
----
-apiVersion: networking.k8s.io/v1
-kind: NetworkPolicy
-metadata:
-  creationTimestamp: null
-  name: v2-default
-spec:
-  ingress:
-    - from:
-        - podSelector:
-            matchLabels:
-              io.kompose.network/v2-default: "true"
-  podSelector:
-    matchLabels:
-      io.kompose.network/v2-default: "true"
-
 ---
 apiVersion: apps/v1
 kind: Deployment
diff --git a/script/test/fixtures/v2/output-os.yaml b/script/test/fixtures/v2/output-os.yaml
index a68ae3e7..f9282d27 100644
--- a/script/test/fixtures/v2/output-os.yaml
+++ b/script/test/fixtures/v2/output-os.yaml
@@ -235,7 +235,7 @@ spec:
 status: {}
 
 ---
-apiVersion: v1
+apiVersion: apps.openshift.io/v1
 kind: DeploymentConfig
 metadata:
   annotations:
@@ -290,7 +290,7 @@ status:
   updatedReplicas: 0
 
 ---
-apiVersion: v1
+apiVersion: image.openshift.io/v1
 kind: ImageStream
 metadata:
   creationTimestamp: null
diff --git a/script/test/fixtures/v3.0/output-k8s.yaml b/script/test/fixtures/v3.0/output-k8s.yaml
index f339d4c3..ae6ee902 100644
--- a/script/test/fixtures/v3.0/output-k8s.yaml
+++ b/script/test/fixtures/v3.0/output-k8s.yaml
@@ -8,7 +8,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   clusterIP: None
   ports:
@@ -28,7 +27,6 @@ metadata:
   labels:
     io.kompose.service: foo
   name: foo
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -65,7 +63,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
diff --git a/script/test/fixtures/v3.0/output-os.yaml b/script/test/fixtures/v3.0/output-os.yaml
index a9e5f0ff..26117700 100644
--- a/script/test/fixtures/v3.0/output-os.yaml
+++ b/script/test/fixtures/v3.0/output-os.yaml
@@ -8,7 +8,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   clusterIP: None
   ports:
@@ -28,7 +27,6 @@ metadata:
   labels:
     io.kompose.service: foo
   name: foo
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -80,7 +78,6 @@ metadata:
   labels:
     io.kompose.service: foo
   name: foo
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -107,7 +104,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -160,7 +156,6 @@ metadata:
   labels:
     io.kompose.service: redis
   name: redis
-  namespace: default
 spec:
   lookupPolicy:
     local: false
diff --git a/script/test/fixtures/vols-subpath/output-k8s.yaml b/script/test/fixtures/vols-subpath/output-k8s.yaml
index 13d7daf4..de17dc83 100644
--- a/script/test/fixtures/vols-subpath/output-k8s.yaml
+++ b/script/test/fixtures/vols-subpath/output-k8s.yaml
@@ -61,20 +61,3 @@ spec:
     requests:
       storage: 100Mi
 status: {}
-
----
-apiVersion: networking.k8s.io/v1
-kind: NetworkPolicy
-metadata:
-  creationTimestamp: null
-  name: vols-subpath-default
-spec:
-  ingress:
-    - from:
-        - podSelector:
-            matchLabels:
-              io.kompose.network/vols-subpath-default: "true"
-  podSelector:
-    matchLabels:
-      io.kompose.network/vols-subpath-default: "true"
-
diff --git a/script/test/fixtures/volume-mounts/windows/output-k8s.yaml b/script/test/fixtures/volume-mounts/windows/output-k8s.yaml
index c4fdc940..29a2eb65 100644
--- a/script/test/fixtures/volume-mounts/windows/output-k8s.yaml
+++ b/script/test/fixtures/volume-mounts/windows/output-k8s.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   ports:
     - name: "80"
@@ -25,7 +24,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -65,7 +63,6 @@ metadata:
   labels:
     io.kompose.service: db-claim0
   name: db-claim0
-  namespace: default
 spec:
   accessModes:
     - ReadWriteOnce
diff --git a/script/test/fixtures/volume-mounts/windows/output-os.yaml b/script/test/fixtures/volume-mounts/windows/output-os.yaml
index f4061f3e..ac6b530e 100644
--- a/script/test/fixtures/volume-mounts/windows/output-os.yaml
+++ b/script/test/fixtures/volume-mounts/windows/output-os.yaml
@@ -6,7 +6,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   ports:
     - name: "80"
@@ -25,7 +24,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   replicas: 1
   selector:
@@ -82,7 +80,6 @@ metadata:
   labels:
     io.kompose.service: db
   name: db
-  namespace: default
 spec:
   lookupPolicy:
     local: false
@@ -107,7 +104,6 @@ metadata:
   labels:
     io.kompose.service: db-claim0
   name: db-claim0
-  namespace: default
 spec:
   accessModes:
     - ReadWriteOnce