Code Monkey home page Code Monkey logo

external-storage's Introduction

External Storage

Build Status

External Provisioners

This repository houses community-maintained external provisioners plus a helper library for building them. Each provisioner is contained in its own directory so for information on how to use one, enter its directory and read its documentation. The library is contained in the lib directory.

What is an 'external provisioner'?

An external provisioner is a dynamic PV provisioner whose code lives out-of-tree/external to Kubernetes. Unlike in-tree dynamic provisioners that run as part of the Kubernetes controller manager, external ones can be deployed & updated independently.

External provisioners work just like in-tree dynamic PV provisioners. A StorageClass object can specify an external provisioner instance to be its provisioner like it can in-tree provisioners. The instance will then watch for PersistentVolumeClaims that ask for the StorageClass and automatically create PersistentVolumes for them. For more information on how dynamic provisioning works, see the docs or this blog post.

How to use the library

import (
  "github.com/kubernetes-incubator/external-storage/lib/controller"
)

You need to implement the Provisioner interface then pass your implementation to a ProvisionController and run the controller. The controller takes care of deciding when to call your implementation's Provision or Delete. The interface and controller are defined in the above package.

You will want to import a specific version of the library to ensure compatibility with certain versions of Kubernetes and to avoid breaking changes. This repo will be tagged according to the library's version (individual provisioners will need to version themselves independently, e.g. by in their documentation pointing to Docker Hub and using Docker tags), so to keep track of releases, go to this repo's releases page.

Note that because your provisioner needs to depend also on client-go and the library itself depends on a specific version of client-go, to avoid a dependency conflict you must ensure you use the exact same version of client-go as the library. You can check what version of client-go the library depends on by looking at its glide.yaml.

For all documentation, including a full guide on how to write an external provisioner using the library that demonstrates the above, see here.

Roadmap

February

  • Finalize repo structure, release process, etc.

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

  • Slack: #sig-storage

Kubernetes Incubator

This is a Kubernetes Incubator project. The project was established 2016-11-15 (as nfs-provisioner). The incubator team for the project is:

  • Sponsor: Clayton (@smarterclayton)
  • Champion: Jan (@jsafrane) & Brad (@childsb)
  • SIG: sig-storage

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

external-storage's People

Contributors

andrewklau avatar avagin avatar childsb avatar ddysher avatar dmission avatar gavrie avatar humblec avatar jackielii avatar jsafrane avatar kolyshkin avatar luksa avatar msau42 avatar obnoxxx avatar rootfs avatar sanyu avatar sarahnovotny avatar tamalsaha avatar wongma7 avatar xingzhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

external-storage's Issues

ploop volumes hanging around after deletion

I create a pvc:

NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS    CLAIM                 STORAGECLASS    REASON    AGE
pvc-d8faddb2-0d09-11e8-b2cc-001c42746431   10Gi       RWO            Delete           Bound     default/pagey-mongo   vzprovisioner             6s

And I can see it exists:

[root@tukd-srv-0080 k8s-volumes]# ploop info kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3/DiskDescriptor.xml
Opening delta /vstorage/tukd-pool-04/k8s-volumes/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3
Opening delta /vstorage/tukd-pool-04/k8s-volumes/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3
Adding delta dev=/dev/ploop26165 img=/vstorage/tukd-pool-04/k8s-volumes/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3 (rw)
Mounted /dev/ploop26165p1 at /vstorage/tukd-pool-04/k8s-volumes/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3.mnt fstype=ext4 data=',balloon_ino=12'
Unmounting file system at /vstorage/tukd-pool-04/k8s-volumes/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3.mnt
Unmounting device /dev/ploop26165
Opening delta /vstorage/tukd-pool-04/k8s-volumes/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3/kubernetes-dynamic-pvc-ff4f3069-8022-11e7-ab4f-001c42b2b9a3
   resource           Size           Used
  1k-blocks       20509264          45080
     inodes        1310720             12

However, once I delete the pvc:

kubectl delete -f pagey_aio.yaml
namespace "pagey" deleted
persistentvolumeclaim "pagey-mongo" deleted
ingress "pagey-admin" deleted
service "mongo" deleted
service "pagerbot-admin" deleted
service "pagerbot" deleted
deployment "mongo" deleted
deployment "pagerbot-admin" deleted
deployment "pagerbot" deleted

And I also ensure the pv is deleted:

kubectl delete pv pvc-d8faddb2-0d09-11e8-b2cc-001c42746431                                                                                   
persistentvolume "pvc-d8faddb2-0d09-11e8-b2cc-001c42746431" deleted

But the disk persists:

# ls -alh /vstorage/tukd-pool-04/k8s-volumes/kubernetes-dynamic-pvc-d8faddb2-0d09-11e8-b2cc-001c42746431
total 23M
drwx------ 1 root root   0 Feb  8 19:54 .
drwx------ 1 root root   0 Jul 17  2017 ..
-rwx------ 1 root root 841 Feb  8 19:54 DiskDescriptor.xml
-rwx------ 1 root root   0 Feb  8 19:54 DiskDescriptor.xml.lck
-rwx------ 1 root root 22M Feb  8 19:54 kubernetes-dynamic-pvc-d8faddb2-0d09-11e8-b2cc-001c42746431

What am I missing here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.