forked from LaconicNetwork/kompose
* adds a label for initContainers, test and user-guide Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com> * solved suggestion version from 2 to 3, coments Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com> * test e2e Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com> * add target to kompose build Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com> * 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](https://github.com/golang/tools/compare/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] <support@github.com> 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 <2064537+sosan@users.noreply.github.com> --------- Signed-off-by: jose luis <2064537+sosan@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kubernetes Prow Robot <20407524+k8s-ci-robot@users.noreply.github.com>
29 lines
709 B
YAML
29 lines
709 B
YAML
---
|
|
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 |