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

ReadWriteOnce set even when volume is "ro" #237

Closed
dustymabe opened this issue Oct 25, 2016 · 1 comment
Closed

ReadWriteOnce set even when volume is "ro" #237

dustymabe opened this issue Oct 25, 2016 · 1 comment
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@dustymabe
Copy link
Contributor

I'm guess that "ro" should mean read only:

https://github.com/kubernetes-incubator/kompose/blob/7435f822ed17837a4d6f472f9a0f800abe1adc95/pkg/transformer/kubernetes/kubernetes.go#L178

Should we change this to be:

diff --git a/pkg/transformer/kubernetes/kubernetes.go b/pkg/transformer/kubernetes/kubernetes.go
index 6f47bdb..1ba7f38 100644
--- a/pkg/transformer/kubernetes/kubernetes.go
+++ b/pkg/transformer/kubernetes/kubernetes.go
@@ -175,7 +175,7 @@ func CreatePVC(name string, mode string) *api.PersistentVolumeClaim {
        }

        if mode == "ro" {
-               pvc.Spec.AccessModes = []api.PersistentVolumeAccessMode{"ReadWriteOnce"}
+               pvc.Spec.AccessModes = []api.PersistentVolumeAccessMode{"ReadOnlyMany"}
        } else {
                pvc.Spec.AccessModes = []api.PersistentVolumeAccessMode{"ReadWriteOnce"}
        }
@surajssd surajssd added the kind/bug Categorizes issue or PR as related to a bug. label Oct 26, 2016
@surajssd
Copy link
Member

@dustymabe yes sure!

@surajssd surajssd assigned surajssd and dustymabe and unassigned surajssd Oct 26, 2016
dustymabe added a commit to dustymabe/kompose that referenced this issue Oct 27, 2016
dustymabe added a commit to dustymabe/kompose that referenced this issue Nov 1, 2016
Fixes kubernetes#237

Also update the code to use the constant values for api.ReadWriteOnce
and api.ReadOnlyMany.
rtnpro pushed a commit to concaf/kompose that referenced this issue Nov 16, 2016
Fixes kubernetes#237

Also update the code to use the constant values for api.ReadWriteOnce
and api.ReadOnlyMany.
concaf pushed a commit to concaf/kompose that referenced this issue Nov 17, 2016
Fixes kubernetes#237

Also update the code to use the constant values for api.ReadWriteOnce
and api.ReadOnlyMany.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants