-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds a label for initContainers, test and user-guide (#1840)
* adds a label for initContainers, test and user-guide Signed-off-by: jose luis <[email protected]> * solved suggestion version from 2 to 3, coments Signed-off-by: jose luis <[email protected]> * test e2e Signed-off-by: jose luis <[email protected]> * add target to kompose build Signed-off-by: jose luis <[email protected]> * chore(deps)(deps): bump golang.org/x/tools from 0.16.1 to 0.19.0 (#1836) Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.16.1 to 0.19.0. - [Release notes](https://github.com/golang/tools/releases) - [Commits](golang/tools@v0.16.1...v0.19.0) --- updated-dependencies: - dependency-name: golang.org/x/tools dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * changed var names contaers to containers changed labels to kompose.init.container.name, kompose.init.container.image, kompose.init.container.command fixed documentation, tests and e2e also merged main with new commits to this branch Signed-off-by: jose luis <[email protected]> --------- Signed-off-by: jose luis <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kubernetes Prow Robot <[email protected]>
- Loading branch information
1 parent
14152d4
commit c9c1080
Showing
7 changed files
with
346 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: "3" | ||
services: | ||
web: | ||
image: nginx | ||
labels: | ||
kompose.init.containers.name: "init-myservice" | ||
kompose.init.containers.image: "busybox:1.28" | ||
kompose.init.containers.command: '["sh", "-c", "until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
io.kompose.service: web | ||
name: web | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
io.kompose.service: web | ||
template: | ||
metadata: | ||
labels: | ||
io.kompose.network/initcontainer-default: "true" | ||
io.kompose.service: web | ||
spec: | ||
containers: | ||
- image: nginx | ||
name: web | ||
initContainers: | ||
- command: | ||
- sh | ||
- -c | ||
- until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done | ||
image: busybox:1.28 | ||
name: init-myservice | ||
restartPolicy: Always |