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

Create PVC object for docker-compose volumes #186

Merged
merged 1 commit into from
Oct 6, 2016

Conversation

surajssd
Copy link
Member

@surajssd surajssd commented Oct 5, 2016

Instead of creating emptydir, create PersistentVolumeClaim for docker-compose volumes by default

Fixes #150

@sebgoa
Copy link
Contributor

sebgoa commented Oct 5, 2016

it would be great to test this on minikube, to make sure we know that this is now supported.

@sebgoa
Copy link
Contributor

sebgoa commented Oct 5, 2016

thanks for including tests and fixtures.

LGTM

@surajssd
Copy link
Member Author

surajssd commented Oct 6, 2016

@sebgoa The fixture I have added can be directly fed to a running k8s cluster or OpenShift cluster provided you have PV already available. I tried it on minikube and a single node OpenShift cluster, and the mounts work.

@surajssd
Copy link
Member Author

surajssd commented Oct 6, 2016

I created PV in minikube VM, using following artifact

apiVersion: v1
kind: PersistentVolume
metadata:
  name: vol1
  labels:
    type: local
spec:
  capacity:
    storage: 5Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  hostPath:
    path: "/home/docker/data"

Need to try the dynamic provisioning though!

Instead of creating emptydir, create PersistentVolumeClaim
for docker-compose volumes by default

Fixes kubernetes#150
@ngtuna
Copy link
Contributor

ngtuna commented Oct 6, 2016

LGTM and tests are visible so this should be in 0.1.1 as well. Merging.

@ngtuna ngtuna merged commit 12d6e87 into kubernetes:master Oct 6, 2016
@ngtuna
Copy link
Contributor

ngtuna commented Oct 6, 2016

@surajssd there was a test run failed on this PR. I'm looking on it
https://travis-ci.org/skippbox/kompose/builds/165631060

@ngtuna
Copy link
Contributor

ngtuna commented Oct 6, 2016

Got it.

kompose -f /home/travis/gopath/src/github.com/skippbox/kompose/script/test/fixtures/volume-mounts/simple-vol-mounts/docker-compose.yml convert --stdout --dc

That should include the new born --provider flag to figure out OpenShift. Fixed at 2d09b95

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

Successfully merging this pull request may close these issues.

3 participants