Skip to content

ReadWriteOnce set even when volume is "ro" #237

Closed
@dustymabe

Description

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"}
        }

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions