Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't create Host key in Volume if no hostPath is defined #23

Closed
wants to merge 1 commit into from

Conversation

mcanevet
Copy link
Contributor

Fixes #11

Please note that this is my very first go patch so it may have to be refactored.
I couldn't find a way to declare ecsVolume out of the if else block, and there is probably a better way to initialize the ecs.Volume structure without duplicating code.
Comments very welcome :-)

@mcanevet
Copy link
Contributor Author

Maybe the logic of the volumes map should be changed here https://github.com/aws/amazon-ecs-cli/blob/v0.1.0/ecs-cli/modules/compose/ecs/utils/convert_task_definition.go#L47 so that the volumeName is the key and hostSourcePath the value and not the other way around.

@yinshiua
Copy link
Contributor

This is merged into PR #201

@yinshiua yinshiua closed this Feb 24, 2017
@tiffanyfay
Copy link
Contributor

Hey @mcanevet thanks for your PR! I cherry-picked your commit and put it in my PR with the addition of making a new volume for all empty host paths since currently your code will re-use the same volume.

@mcanevet mcanevet deleted the fix/volume_sourcepath branch March 2, 2017 07:56
@tiffanyfay
Copy link
Contributor

@mcanevet Hey, I wanted to check that you're fine with your commit being merged in under the Apache 2.0 license. Thanks!

@mcanevet
Copy link
Contributor Author

@tiffanyfj I'm fine with that.

@tiffanyfay
Copy link
Contributor

@mcanevet Great, thanks !

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

Successfully merging this pull request may close these issues.

3 participants