Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Updating the types used for volumes,networks and more #7

Merged
merged 1 commit into from
Oct 18, 2018

Conversation

prachidamle
Copy link
Member

This should fix the unmarshal issue reported
#6

tool.go Outdated
DNSOpt []string `yaml:"dns_opt,omitempty"`
DNSSearch []string `yaml:"dns_search,omitempty"`
DrainTimeoutMs string `yaml:"drain_timeout_ms,omitempty"`
Volumes []map[string]interface{} `yaml:"volumes,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Volumes should be []string

-	Volumes             []map[string]interface{} `yaml:"volumes,omitempty"`
+	Volumes             []string                 `yaml:"volumes,omitempty"`

Copy link
Member Author

@prachidamle prachidamle Oct 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested with this docker-compose.yml construct and just using []string does not work. It will lead you to another Unmarshal error.

version: '3.2'
services:
  web:
    image: sdelements/lets-chat
    stdin_open: true
    tty: true
    links:
    - database:mongo
    ports:
    - 9890:8080/tcp
    labels:
      io.rancher.container.pull_image: always
      io.rancher.scheduler.global: 'true'
    networks:
      - frontend
      - backend  
    volumes:
      - type: volume
        source: mydata
        target: /data
        volume:
          nocopy: true
      - type: bind
        source: ./static
        target: /opt/app/static

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is version 3.2 of compose file. On Rancher v1.x just version 1 and 2 supported..

Copy link
Member Author

@prachidamle prachidamle Oct 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, long syntax for 'volumes' is supported since version "2.3", will check about our compatibility and change the type

@prachidamle
Copy link
Member Author

@rawmind0 @alena1108 can you review

@rawmind0
Copy link
Contributor

LGTM...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants