kompose
kompose copied to clipboard
Add support to new depends_on scheme and yaml anchors
Hello kompose team!
I use kompose as part of skaffold local builds.
We have some docker-compose files with new ( compose v3 file references ) syntax, for example:
---
version: '3'
x-container: &container
restart: always
logging:
options:
max-size: '200k'
max-file: '10'
services:
example_service:
<<: *container
image: example_service_image
env_file:
- app.env
expose:
- 3000
depends_on:
openssl-init:
condition: service_completed_successfully
healthcheck:
test: >-
wget -q --no-check-certificate -O /dev/null http://127.0.0.1:$${PORT:-3000}/health-check
volumes:
- init_certs:/certs
openssl-init:
<<: *container
image: example_init_image
restart: 'no'
environment:
HOST: $VIRTUAL_HOST
volumes:
- init_certs:/tmp
volumes:
init_certs:
You can see two new sections:
- YAML anchors into docker-compose
- new depends_on conditionals, service_completed_successfully wait for init container have status exit 0
Now if I try to convert this docker-compose.yml file into k8s manifest i have error:
- case one : depends_on, see docs
$ kompose -f docker-compose.yml convert
FATA services.nuxt.depends_on must be a list
I think in this case container openssl-init
must converted to k8s init container , because this container generate certificates for container example_service
.
- case two : YAML anchors, see docs
$ kompose -f docker-compose.yml convert
FATA (root) Additional property x-container is not allowed
Can you add support this features to kompose?
Thanks!
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Reopen this issue with
/reopen
- Mark this issue as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied- After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied- After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closedYou can:
- Reopen this issue with
/reopen
- Mark this issue as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.