-
Notifications
You must be signed in to change notification settings - Fork 770
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
Fixed tmpfs with mode failure #816
Conversation
@surajnarwade, thank you for the pull request! We'll request some people to review your PR. @procrypt and @cdrage, please review this. |
@@ -351,7 +352,8 @@ func (k *Kubernetes) ConfigTmpfs(name string, service kobject.ServiceConfig) ([] | |||
for index, volume := range service.TmpFs { | |||
//naming volumes if multiple tmpfs are provided | |||
volumeName := fmt.Sprintf("%s-tmpfs%d", name, index) | |||
|
|||
v := strings.Split(volume, ":") | |||
volume = v[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be just volume = strings.Split(volume, ":")
remove the other line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it will not work,
# github.com/kubernetes/kompose/pkg/transformer/kubernetes
pkg/transformer/kubernetes/kubernetes.go:355: cannot use strings.Split(volume, ":") (type []string) as type string in assignment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@surajnarwade Pretty easy to figure it out, I forgot to add the [0].
Do: strings.Split(volume, ":")[0]
faf621f
to
18ffd3b
Compare
issue is being tracked here #807 |
@surajnarwade can you add tests? After that, LGTM. |
Fixes kubernetes#807 now kompose will ignore mode of tmpfs and will pass only mount path.
18ffd3b
to
8a19c47
Compare
added functional test |
LGTM! Thanks for adding the tests. |
Fixes #807
now kompose will ignore mode of tmpfs and will pass only mount path.