kubernetes / kompose

Convert Compose to Kubernetes
http://kompose.io
Apache License 2.0
9.67k stars 764 forks source link

volumes long-syntax doesn't work #865

Closed abitrolly closed 6 years ago

abitrolly commented 7 years ago

Conversion matrix specifies that volumes: long-syntax works, but it doesn't, because it requires at least version: '3.2`` in the header to be loaded. For example, this fails to validate withdocker-compose`:

version: '3'
services:
  cs-btcd:
    image: cybernode/bitcoin-btcd:temp
    volumes:
      - type: volume
        source: /cyberdata
✗ docker-compose config 
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.cs-btcd.volumes contains an invalid type, it should be a string

The same error is reported by kompose:

✗ kompose convert
FATA services.cs-btcd.volumes.0 must be a string  

Changing version to 3.2 makes docker-compose config pass, but kompose still fails there:

✗ kompose convert       
FATA Version 3.2 of Docker Compose is not supported. Please use version 1, 2 or 3 
abitrolly commented 7 years ago

Related to #725

surajnarwade commented 7 years ago

@abitrolly , as of now we don't support docker-compose 3.2 yet @cdrage we should update conversion-matrix accordingly

abitrolly commented 7 years ago

Looks like there is some partial support in https://github.com/kubernetes/kompose/blob/master/pkg/loader/compose/v3.go#L120

xianlubird commented 7 years ago

Maybe we can support version 3.1-3.2-3.3-3.4. Docker compose in version 3.x develop fast and many attribute is added into it. We can work together to develop support these new attribute.We can support 3.1 first and step by step to next version.

fejta-bot commented 6 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot commented 6 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten /remove-lifecycle stale

surajnarwade commented 6 years ago

/remove-lifecycle rotten