Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Shared Persistent Volume #471

Merged

Conversation

kevtaylor
Copy link
Contributor

SharedPersistentVolume=true/false in cluster.yaml
Creates a dynamic EFS volume available across all zones
Creates persistent volume definitions for kubernetes - derives the efs mount point
Creates service scripts to create the persistent volume in the cluster

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

Once you've signed, please reply here (e.g. "I signed it!") and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Mar 28, 2017
@kevtaylor
Copy link
Contributor Author

kevtaylor commented Mar 28, 2017 via email

@mumoshu
Copy link
Contributor

mumoshu commented Mar 28, 2017

Hi @kevtaylor, thanks for your contribution 👍
Though this change looks nice, would you mind sharing me example use-cases of this feature for my education?

@@ -775,6 +775,9 @@ worker:
# See https://github.com/kubernetes-incubator/kube-aws/issues/208 for more information
#elasticFileSystemId: fs-47a2c22e

# Create shared persistent volume
#sharedPersistentVolume: false
Copy link
Contributor

@mumoshu mumoshu Mar 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering/Not intended to scope-creep this PR; Are there any use-cases that lead us want to create multiple of shared persistent volumes, possibly varying volume names and storage sizes?

sharedPersistentVolumes:
- name: shared-efs
  provider: efs
  size: 500Gi
- name: shared-ebs
  provider: ebs
  size: 100Gi

@kevtaylor
Copy link
Contributor Author

@mumoshu The use case we have is regarding batch processes that we run using chronos api. We create indexes which ate produced by a batch job which need to be read or published by another job. An Efs volume is mounted across multiple instances so if we have processes running across a cluster they can all see the shared volume. The current kube-aws offering assumes an efs mount point so we create a dynamic one and set it up to be available in kubernetes. The 500Gb limit could be configured but that would bloat the templates so we just figured that you could modify it to your own spec

@mumoshu
Copy link
Contributor

mumoshu commented Mar 28, 2017

Thanks @kevtaylor!
Are you ok with those volumes being deleted on a k8s cluster is destroyed?
In other words, don't you want to retain those efs file systems regardless of what the lifecycles of k8s clusters are?

@mumoshu
Copy link
Contributor

mumoshu commented Mar 28, 2017

@kevtaylor Btw, would you mind signing the CLA before merging this?

@mumoshu
Copy link
Contributor

mumoshu commented Mar 29, 2017

@kevtaylor Would you mind running make format and adds the changes from it to this PR?

@kevtaylor
Copy link
Contributor Author

@mumoshu We understand the destruction of the volume if you take the whole cluster out and I would assume that if anyone didn't want that they could use the existing process of supplying their own I'd. We are in the process if getting the CLA requirements and will push the requested format shortly.

Restart=on-failure
ExecStartPre=/opt/bin/set-efs-pv
ExecStartPre=/usr/bin/systemctl is-active kube-node-taint-and-uncordon.service
ExecStart=/opt/bin/load-efs-pv
Copy link
Contributor

@mumoshu mumoshu Mar 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you're missing an entry for the /opt/bin/load-efs-pv script under write_files:?
set-efs-pv does seem to exist but no load-efs-pv

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My colleague pushed the missing part up to the commit. Apologies.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Once other minor comments are addressed, I'll be ready to merge this

@jollinshead jollinshead force-pushed the feature/SharedPersistentVolume branch from d584764 to 3f4b70e Compare March 29, 2017 11:43
@jollinshead jollinshead force-pushed the feature/SharedPersistentVolume branch from 3f4b70e to 8dd141f Compare March 29, 2017 11:44
@codecov-io
Copy link

codecov-io commented Mar 29, 2017

Codecov Report

Merging #471 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #471   +/-   ##
=======================================
  Coverage   38.06%   38.06%           
=======================================
  Files          46       46           
  Lines        3145     3145           
=======================================
  Hits         1197     1197           
  Misses       1752     1752           
  Partials      196      196
Impacted Files Coverage Δ
core/controlplane/config/config.go 55.2% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 901d7b2...21f2b35. Read the comment docs.

@mumoshu
Copy link
Contributor

mumoshu commented Apr 2, 2017

@kevtaylor Could you reply with I signed it! so that the CI verifies your organization's sign on CLA?

@mumoshu
Copy link
Contributor

mumoshu commented Apr 10, 2017

Hi @jollinshead! Is @kevtaylor your colleague? Then, can you confirm that you have signed CLA as an organization?

@kevtaylor
Copy link
Contributor Author

@mumoshu Hi. I am waiting for a representative from our organisation to sign the CLA. I'll post here when I get it. Sorry for the delay but politics gets in the way of progress :-)

@mumoshu
Copy link
Contributor

mumoshu commented Apr 10, 2017

@kevtaylor Got it. Thanks for the reply and sorry for rushing you 👍

@kevtaylor
Copy link
Contributor Author

I have been approved as an individual

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Apr 13, 2017
@mumoshu
Copy link
Contributor

mumoshu commented Apr 13, 2017 via email

@mumoshu mumoshu merged commit 9038a0e into kubernetes-retired:master Apr 13, 2017
@mumoshu
Copy link
Contributor

mumoshu commented Apr 13, 2017

@kevtaylor LGTM. Thanks for your contribution 👍

@mumoshu mumoshu added this to the v0.9.6-rc.3 milestone Apr 13, 2017
camilb added a commit to camilb/kube-aws that referenced this pull request Apr 21, 2017
* kubernetes-incubator/master:
  Don't mount /var/lib/rkt into kubelet to avoid shared bind-mounts propagation
  Fix to calico configuration file etcd endpoints
  Fix hyperlink to restore script in Readme.md. Reference 'autosave' rather than 'export' in comments of cluster.yaml.
  'Restore' feature to restore Kubernetes Resources from S3 backup
  Add missing '/' when constructing the Autosave S3 put path
  Shared Persistent Volume (kubernetes-retired#471)
  Fix an incorrect variable name in the e2e/run script
  Add documentation for administrating etcd cluster Resolves kubernetes-retired#491
  use gzip base64 encoding for customFiles
  New options: customFiles and customSystemdUnits
  Add cluster.yaml details for apiEndpointName
  Fix the dead-lock while bootstrapping etcd cluster when wait signal is enabled. Resolves kubernetes-retired#525
  Fix elasticFileSystemId to be propagated to node pools Resolves kubernetes-retired#487
  Minor fixup for etcd unit files
  Fix up apiEndpoints.loadBalancer config
kylehodgetts pushed a commit to HotelsDotCom/kube-aws that referenced this pull request Mar 27, 2018
- Add the new option `sharedPersistentVolume: true/false` to cluster.yaml
- When enabled, an EFS volume which is available across all zones is created
- A persistent volume definition which derives the EFS mount point is created on Kubernetes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. waiting for another code change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants