Giter VIP home page Giter VIP logo

drivers's Introduction

Build Status

CSI Drivers

These drivers are provided purely for illustrative purposes, and should not be used for production workloads.

Other sample drivers

Please read Drivers for more information

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:

Code of conduct

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

drivers's People

Contributors

chakri-nelluri avatar codenrhoden avatar dims avatar edisonxiang avatar gyliu513 avatar haoqing0110 avatar humblec avatar jlaswell avatar jsafrane avatar k8s-ci-robot avatar lpabon avatar msau42 avatar nikhita avatar nstott avatar pohly avatar prateekpandey14 avatar princerachit avatar rootfs avatar saad-ali avatar sbezverk avatar spiffxp avatar vladimirvivien avatar wackxu avatar wongma7 avatar xing-yang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drivers's Issues

Remove the csi-common package

This package is confusing and there is no need to have it. gRPC golang implementations should use the csi.pb.go directly.

Indicate repo is deprecated in README

data distribution image driver

I (and others) would like to contribute a csi driver that is vendor agnostic and services the greater community.

I'm asking for a kubernetes-csi/image-driver repo be created to house this.

The idea would be to use an oci container image as a volume source. So that all the container caching/distribution mechanisms could be used to ship data.

One example use case:
Currently, I'm creating containers that contain some data to share out, and an nginx server so that the container can be launched and share out data. The problem is, it couples the update cycle of the nginx server and the data together. If the data is architecture specific (rpms for example), then you may need multiple combinations of builds depending on what architecture the container is expected to run on. For example, x86_64 rpms with an arm64 nginx so that an arm box can be used to bootstrap x86 boxes.

So, what I would like to do is be able to create pure data containers. IE a Dockerfile like:
FROM scratch
ADD /pile-of-rpms /rpms

And consume it in a pod such as:

apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
  - name: nginx
    image: nginx:1.13-alpine
    ports:
    - containerPort: 80
    volumeMount:
    - name: data
      mountPath: /usr/share/nginx/html
  volumes:
  - name: data
    csi:
      driver: drivers.k8s.io/image-driver
      volumeAttributes:
          image: kfox1111/misc:test

nodeServer does not implement csi.NodeServer.NodeGetVolumeStats method

When trying to compile the hostpathplugin driver, it outputs the following error:

go build -o hostpathplugin.exe github.com/kubernetes-csi/drivers/app/hostpathplugin
# github.com/kubernetes-csi/drivers/pkg/hostpath
C:\Users\Test\go\src\github.com\kubernetes-csi\drivers\pkg\hostpath\hostpath.go:123:37: cannot use hp.ns (type *nodeServer) as type csi.NodeServer in argument to s.Start:
    *nodeServer does not implement csi.NodeServer (missing NodeGetVolumeStats method)

It seems that the NodeGetVolumeStats method has been added to the NodeServer interface 2 months ago, while the hostpathplugin driver (and the others as well) were last updated 3 months ago.

[1] container-storage-interface/spec@aeca98c

Travis support

There is a .travis.yaml support already there, but it needs to be enabled.

Error happens when building the `hostpath` driver

  1. git clone https://github.com/kubernetes-csi/drivers.git
  2. enter into the drivers folder
  3. # make hostpath show below error:
if [ ! -d ./vendor ]; then dep ensure; fi
/bin/sh: 1: dep: not found
Makefile:35: recipe for target 'hostpath' failed
make: *** [hostpath] Error 127

Try to # go get github.com/golang/dep, but it fails at:

# github.com/golang/dep/vendor/github.com/boltdb/bolt
flag provided but not defined: -goversion
usage: compile [options] file.go...
...

The mount source path of nfs is not correct after deploy pod with using CSI NFS driver.

  1. Enable CSI by add the below parameters
API Server binary:
--allow-privileged=true
--feature-gates=CSIPersistentVolume=true,MountPropagation=true
--runtime-config=storage.k8s.io/v1alpha1=true

Controller-manager binary:
--feature-gates=CSIPersistentVolume=true

Kubelet:
--allow-privileged=true
--feature-gates=CSIPersistentVolume=true,MountPropagation=true
  1. Deploy NFS driver according to https://github.com/kubernetes-csi/drivers/tree/master/pkg/nfs/deploy/kubernetes
[root@ib17b13 kubernetes]# kubectl  get sts
NAME                     DESIRED   CURRENT   AGE
csi-attacher-nfsplugin   1         1         22d
[root@ib17b13 kubernetes]# kubectl get ds
NAME                       DESIRED   CURRENT   READY     UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
csi-nodeplugin-nfsplugin   2         2         2         2            2           <none>          22d

[root@ib17b13 kubernetes]# kubectl  get serviceaccount
NAME             SECRETS   AGE
csi-attacher     1         22d
csi-nodeplugin   1         22d
default          1         24d

[root@ib17b13 kubernetes]# kubectl get clusterrole|egrep "attach|csi"
csi-nodeplugin                                                         22d
external-attacher-runner                                               22d

[root@ib17b13 kubernetes]# kubectl  get clusterrolebinding|grep csi
csi-attacher-role                                      22d
csi-nodeplugin                                         22d
  1. Deploy a Pod using CSI volume. Before starting this example, ensure to install NFS.
[root@ib17b13 kubernetes]# showmount  -e
Export list for ib17b13:
/root/csi/nfs *

Modify pkg/nfs/examples/kubernetes/nginx.yaml, replace

csi.volume.kubernetes.io/volume-attributes: '{"server": "10.10.10.10", "share": "share "}'  as 

csi.volume.kubernetes.io/volume-attributes: '{"server": "9.21.53.23", "share": "/root/csi/nfs"}'

Create nignx:

# kubectl create -f nginx.yaml
persistentvolume "data-nfsplugin" created
persistentvolumeclaim "data-nfsplugin" created
pod "nginx" created

Check the nignx container nfs path, found mount nfs server source path is not correct.

# kubectl exec nginx -it  -- bash

image

The nfs mount source path should be 9.21.53.23:/root/csi/nfs not 9.21.53.23:/

err=no volume plugin matched

I'm trying to create a CSI plugin for nfusr, see https://github.com/quamotion/nfusr-csi.

When I provision a pod using a PVC which leverages the CSI plugin (see https://github.com/quamotion/nfusr-csi/blob/master/sample/nginx.yaml), the pod remains stuck in the ContainerCreating state, and the output of systemctl status kubelet on the node which hosts the pod is:

err=failed to get Plugin from volumeSpec for volume "data-nfusrplugin" err=no volume plugin matched

I'd love to troubleshoot this but I"m not sure where to start. The csi-attacher-nfusrplugin and csi-nodeplugin-nfusrplugin pods have been deployed and I don't see anything off in their output.

I'd be happy to provide any additional information.

When hostpathplugin starts without specifying parameters, it fails with segmentation fault

sbezverk@kube-4:~/developing/go/src/github.com/kubernetes-csi/drivers$ _output/hostpathplugin
I0105 21:03:40.909191 13038 hostpath.go:71] Driver: csi-hostpath version: 0.1.0
E0105 21:03:40.909620 13038 driver.go:45] NodeID missing
I0105 21:03:40.909734 13038 driver.go:116] Enabling controller service capability: CREATE_DELETE_VOLUME
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x77ccb8]

goroutine 1 [running]:
github.com/kubernetes-csi/drivers/pkg/csi-common.(*CSIDriver).AddControllerServiceCapabilities(0x0, 0xc42005de5c, 0x1, 0x1)
/home/sbezverk/developing/go/src/github.com/kubernetes-csi/drivers/pkg/csi-common/driver.go:120 +0x2d8
github.com/kubernetes-csi/drivers/pkg/hostpath.(*hostPath).Run(0xc420084500, 0x88bd88, 0xc, 0x0, 0x0, 0x88f84d, 0x13)
/home/sbezverk/developing/go/src/github.com/kubernetes-csi/drivers/pkg/hostpath/hostpath.go:75 +0x227
main.handle()
/home/sbezverk/developing/go/src/github.com/kubernetes-csi/drivers/app/hostpathplugin/main.go:45 +0x83
main.main()
/home/sbezverk/developing/go/src/github.com/kubernetes-csi/drivers/app/hostpathplugin/main.go:39 +0x27

current hostpath code on master does not work with quay.io/k8scsi/csi-provisioner:v0.2.0

I have made hostpath image with latest code in this master branch and use following statefulset (replace quay.io/k8scsi/hostpathplugin:v0.2.0 with my image: andyzhangx/csi-hostpath:1.0.0) to create csi-hostpath, csi-external-provisioner container always fail like following:

$ kubectl logs  csi-hostpath-driver-0 -c csi-external-provisioner
I0328 07:12:38.667762       1 csi-provisioner.go:68] Building kube configs for running in cluster...
I0328 07:12:38.700550       1 controller.go:84] Connecting to /csi/csi.sock
I0328 07:12:38.701043       1 controller.go:111] Still trying, connection is CONNECTING
I0328 07:12:38.701470       1 controller.go:108] Connected
I0328 07:12:38.701490       1 controller.go:75] GRPC call: /csi.v0.Identity/GetPluginCapabilities
I0328 07:12:38.701495       1 controller.go:76] GRPC request:
I0328 07:12:38.703066       1 controller.go:78] GRPC response: capabilities:<>
I0328 07:12:38.703127       1 controller.go:79] GRPC error: <nil>
F0328 07:12:38.703136       1 controller.go:198] no plugin controller service support detected
$ kubectl logs  csi-hostpath-driver-0 -c hostpath-driver
I0328 07:50:21.122995       1 hostpath.go:89] Driver: csi-hostpath
I0328 07:50:21.123066       1 driver.go:80] Enabling controller service capability: CREATE_DELETE_VOLUME
I0328 07:50:21.123072       1 driver.go:92] Enabling volume access mode: SINGLE_NODE_WRITER
I0328 07:50:21.123212       1 server.go:108] Listening for connections on address: &net.UnixAddr{Name:"//csi/csi.sock", Net:"unix"}
I0328 07:50:21.387941       1 utils.go:96] GRPC call: /csi.v0.Identity/GetPluginInfo
I0328 07:50:21.388119       1 utils.go:97] GRPC request:
I0328 07:50:21.388199       1 identityserver-default.go:32] Using default GetPluginInnfo
I0328 07:50:21.388224       1 utils.go:102] GRPC response: name:"csi-hostpath" vendor_version:"0.2.0"
I0328 07:50:21.389431       1 utils.go:96] GRPC call: /csi.v0.Node/NodeGetId
I0328 07:50:21.389513       1 utils.go:97] GRPC request:
I0328 07:50:21.389631       1 nodeserver-default.go:40] Using default NodeGetId
I0328 07:50:21.389673       1 utils.go:102] GRPC response: node_id:"k8s-agentpool-32652687-0"
I0328 07:50:21.703035       1 utils.go:96] GRPC call: /csi.v0.Identity/GetPluginInfo
I0328 07:50:21.703049       1 utils.go:97] GRPC request:
I0328 07:50:21.703102       1 identityserver-default.go:32] Using default GetPluginInnfo
I0328 07:50:21.703107       1 utils.go:102] GRPC response: name:"csi-hostpath" vendor_version:"0.2.0"
I0328 07:50:21.703753       1 utils.go:96] GRPC call: /csi.v0.Identity/Probe
I0328 07:50:21.703769       1 utils.go:97] GRPC request:
I0328 07:50:21.703784       1 utils.go:102] GRPC response:
I0328 07:50:21.704578       1 utils.go:96] GRPC call: /csi.v0.Identity/GetPluginCapabilities
I0328 07:50:21.704595       1 utils.go:97] GRPC request:
I0328 07:50:21.704615       1 identityserver-default.go:53] Using default capabilities
I0328 07:50:21.704620       1 utils.go:102] GRPC response: capabilities:<service:<type:CONTROLLER_SERVICE > >

The Dockerfile I am using for csi-hostpath is as following:

FROM alpine
LABEL maintainers="Kubernetes Authors"
LABEL description="HostPath CSI Plugin"

COPY hostpathplugin /hostpathplugin
ENTRYPOINT ["/hostpathplugin"]

Is there anything I am missing when making csi-hostpath image? The original quay.io/k8scsi/hostpathplugin:v0.2.0 image works with csi-external-provisioner
Thanks.

Create a SECURITY_CONTACTS file.

As per the email sent to kubernetes-dev[1], please create a SECURITY_CONTACTS
file.

The template for the file can be found in the kubernetes-template repository[2].
A description for the file is in the steering-committee docs[3], you might need
to search that page for "Security Contacts".

Please feel free to ping me on the PR when you make it, otherwise I will see when
you close this issue. :)

Thanks so much, let me know if you have any questions.

(This issue was generated from a tool, apologies for any weirdness.)

[1] https://groups.google.com/forum/#!topic/kubernetes-dev/codeiIoQ6QE
[2] https://github.com/kubernetes/kubernetes-template-project/blob/master/SECURITY_CONTACTS
[3] https://github.com/kubernetes/community/blob/master/committee-steering/governance/sig-governance-template-short.md

Block Volume not supported by hostpath driver

I testing the hostpath example but hit the following error : "Block Volume not supported"

test@dsib1093:~$ csc controller new --endpoint tcp://127.0.0.1:10000 --cap 1,block CSIVolumeName
Block Volume not supported

Please use -h,--help for more information
test@dsib1093:~$ csc controller new --endpoint tcp://127.0.0.1:10000 -l debug --cap 1,block CSIVolumeName
DEBU[0000] assigned the root context
DEBU[0000] creating volume request="{CSIVolumeName [block:<> access_mode:<mode:SINGLE_NODE_WRITER > ] map[] map[] {} [] 0}"
DEBU[0000] parsed endpoint info addr="127.0.0.1:10000" proto=tcp timeout=1m0s
Block Volume not supported

Please use -h,--help for more information

hostpath driver must implement GetPluginCapabilities

The example from kubernetes-csi/docs#11 fails with the current quay.io/k8scsi images. The external-attacher runs into a fatal error and terminates:

I0314 16:24:49.735790       1 controller.go:75] GRPC call: /csi.v0.Identity/GetPluginCapabilities
I0314 16:24:49.735800       1 controller.go:76] GRPC request: 
I0314 16:24:49.736568       1 controller.go:78] GRPC response: capabilities:<service:<> > 
I0314 16:24:49.736620       1 controller.go:79] GRPC error: <nil>
F0314 16:24:49.736636       1 controller.go:198] no plugin controller service support detected

This is querying the hostpath-driver, which says:

I0314 16:26:17.887709       1 utils.go:96] GRPC call: /csi.v0.Identity/GetPluginCapabilities
I0314 16:26:17.887761       1 utils.go:97] GRPC request: 
I0314 16:26:17.887778       1 identityserver-default.go:53] Using default capabilities
I0314 16:26:17.887804       1 utils.go:102] GRPC response: capabilities:<service:<> > 

I haven't looked at the source, but it looks like the hostpath driver doesn't implement GetPluginCapabilities?

CSI drivers should not depend on Kubernetes

It's fairly common to see importing Kubernetes in our drivers:

Import (
	"k8s.io/kubernetes/pkg/util/mount"
	"k8s.io/kubernetes/pkg/volume/util"
)

The drivers should be totally independent on Kubernetes and should not import it.

comments spelling mistake in flexvolumedriver.go

comments spelling mistake in flexvolumedriver.go,change iff to if
Current: // Returns true iff the given command is known to be unsupported.
Correct: // Returns true if the given command is known to be unsupported.

Hostpath driver: csi-pod cannot be created

I am new to CSI and follows guideline here https://kubernetes-csi.github.io/docs/Example.html. But when i create csi-pod as stated, it fails to be created.

pod status

NAME READY STATUS RESTARTS AGE
csi-pod 3/4 RunContainerError 0 2m

Error message

Events:
Normal Scheduled 1m default-scheduler Successfully assigned csi-pod to minikube
Normal SuccessfulMountVolume 1m kubelet, minikube MountVolume.SetUp succeeded for volume "socket-dir"
Normal SuccessfulMountVolume 1m kubelet, minikube MountVolume.SetUp succeeded for volume "mountpoint-dir"
Normal SuccessfulMountVolume 1m kubelet, minikube MountVolume.SetUp succeeded for volume "csi-service-account-token-4rwxz"
Normal Pulling 1m kubelet, minikube pulling image "quay.io/k8scsi/csi-provisioner:v0.3.0"
Normal Pulled 1m kubelet, minikube Successfully pulled image "quay.io/k8scsi/csi-provisioner:v0.3.0"
Normal Created 1m kubelet, minikube Created container
Normal Started 1m kubelet, minikube Started container
Normal Pulling 1m kubelet, minikube pulling image "quay.io/k8scsi/driver-registrar:v0.2.0"
Normal Pulled 1m kubelet, minikube Successfully pulled image "quay.io/k8scsi/driver-registrar:v0.2.0"
Normal Created 1m kubelet, minikube Created container
Normal Started 1m kubelet, minikube Started container
Normal Pulling 1m kubelet, minikube pulling image "quay.io/k8scsi/csi-attacher:v0.2.0"
Normal Pulled 59s kubelet, minikube Successfully pulled image "quay.io/k8scsi/csi-attacher:v0.2.0"
Normal Created 59s kubelet, minikube Created container
Normal Started 59s kubelet, minikube Started container
Normal Pulling 59s kubelet, minikube pulling image "quay.io/k8scsi/hostpathplugin:v0.2.0"
Normal Pulled 55s kubelet, minikube Successfully pulled image "quay.io/k8scsi/hostpathplugin:v0.2.0"
Normal Created 55s kubelet, minikube Created container
Warning Failed 55s kubelet, minikube Error: failed to start container "hostpath-driver": Error response from daemon: OCI runtime create failed: open /var/run/docker/runtime-runc/moby/hostpath-driver/state.json: no such file or directory: unknown

Env: MacOS High Sierra

k8s version:

Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T22:29:25Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

k8s env

minikube

docker version:

`Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:13:02 2018
OS/Arch: darwin/amd64
Experimental: false
Orchestrator: swarm

Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:22:38 2018
OS/Arch: linux/amd64
Experimental: true`

Unit testing framework

All drivers should have unit tests that would check their correctness and save us from regressions. For that, there should be a simple framework that a driver author would use to poke the driver easily with different requests and check that the responses, mounted directories, executed commands and other driver behavior is correct.

There should be also a simple mock for the most common operation like mount, checking if a directory is mounted, executing stuff, scanning /dev and so on.

E2E tests for drivers

Today, we do not have any e2e test for drivers.
Opening an issue to add E2E tests for drivers.

Add strict validation code in csi-common

CSI specs dictates strict constraints on valid characters and size limits on fields. Today we don't have any validation code on fields. Opening an issue to track it.

Enable CSI hostpath example on windows

Is there any example about how to make CSI work on Windows? Since for windows cluster, the master is also Linux, so only driver-registrar and plugin drivers need to run on windows agent node. I would like to know whether there is any example or investigation work about how to make CSI work on Windows.

anyway,

  • build hostpathplugin for windows works:
CGO_ENABLED=0 GOOS=windows go build -a -ldflags '-extldflags "-static"' -o _output/hostpathplugin.exe ./app/hostpathplugin
  • build driver-registrar for windows also works:
CGO_ENABLED=0 GOOS=windows go build -a -ldflags '-extldflags "-static"' -o ./bin/driver-registrar.exe ./cmd/driver-registrar

So what we need is to run a windows pod with above two components on every windows agent node.

Iscsi driver mounts volume at wrong path.

The iscsi driver appends volume name to the actual target path. Therefore, the disk is mounted at /actual/mount/path/vol_name whereas it should be at actual/mount/path/.

This bug lets the workload transition to Running state however NodeUnpublishVolume is not made by the kubelet. Thus, the mounted disk is never unmounted.

GRPC error: rpc error: code = Unimplemented desc = unknown service csi.v0.Controller

Hi, I am trying to use the csi nfs driver on an ARM platform (RPI) and am running into the above problem.

I had to recompile the code for ARM and subsequently make the images for distribution within the cluster as the images available on the Internet are for amd64 architecture - which I learned the hard way :).

I have tried compiling the csi-attacher from master and from tag v0.2.0 and both produce the following docker logs report:

I0520 00:58:21.631206       1 connection.go:88] Connecting to /var/lib/csi/sockets/pluginproxy/csi.sock
I0520 00:58:21.632494       1 connection.go:115] Still trying, connection is CONNECTING
I0520 00:58:21.633690       1 connection.go:112] Connected
I0520 00:58:21.633781       1 connection.go:235] GRPC call: /csi.v0.Identity/GetPluginInfo
I0520 00:58:21.633814       1 connection.go:236] GRPC request: 
I0520 00:58:21.635732       1 connection.go:238] GRPC response: name:"csi-nfsplugin" vendor_version:"0.2.0" 
I0520 00:58:21.635923       1 connection.go:239] GRPC error: <nil>
I0520 00:58:21.635975       1 main.go:98] CSI driver name: "csi-nfsplugin"
I0520 00:58:21.636077       1 connection.go:235] GRPC call: /csi.v0.Identity/Probe
I0520 00:58:21.636107       1 connection.go:236] GRPC request: 
I0520 00:58:21.637470       1 connection.go:238] GRPC response: 
I0520 00:58:21.637561       1 connection.go:239] GRPC error: <nil>
I0520 00:58:21.637597       1 main.go:170] Probe succeeded
I0520 00:58:21.637637       1 connection.go:235] GRPC call: /csi.v0.Identity/GetPluginCapabilities
I0520 00:58:21.637665       1 connection.go:236] GRPC request: 
I0520 00:58:21.639276       1 connection.go:238] GRPC response: capabilities:<service:<type:CONTROLLER_SERVICE > > 
I0520 00:58:21.639441       1 connection.go:239] GRPC error: <nil>
I0520 00:58:21.639487       1 connection.go:235] GRPC call: /csi.v0.Controller/ControllerGetCapabilities
I0520 00:58:21.639517       1 connection.go:236] GRPC request: 
I0520 00:58:21.640741       1 connection.go:238] GRPC response: 
I0520 00:58:21.640943       1 connection.go:239] GRPC error: rpc error: code = Unimplemented desc = unknown service csi.v0.Controller

The kubernetes master is v1.10.2 whist the nodes are v1.10.1.

I noticed the Controller defined in github.com/container-storage-interface/spec/lib/go/csi/v0/csi.pb.go and kubernetes-csi/drivers/pkg/csi-common/controllerserver-default.go. However, I am not familiar with how to associate them together.

I do notice that the Identity service is working properly from the log report above and I notice the Identity services also in github.com/container-storage-interface/spec/lib/go/csi/v0/csi.pb.go.

With the Identity service working and the Controller service not working, I feel this is something simple, I just am not capable of working it out yet.

Can I implement a Vault CSI driver?

I would like to use Vault as source of secret for my Kubernetes cluster. I have read this awesome post https://arslan.io/2018/06/21/how-to-write-a-container-storage-interface-csi-plugin/ post by @fatih . I understand the overall process. I would like to implement a tmpfs based volume like Secrets that provision secrets using Vault.

Few things that are not clear to me:

  • How do I use the service account from the Pod where this Volume is mounted to issue the secret ? This will ensure authZ at Vault level.

  • Vault secrets come with a ttl. So, we need to periodically refresh the secret. I would like to do this via Node plugin instead of a sidecar. I got too many side cars already and not enough room for real applications.

Is this something that will be possible as a CSI driver?

cc: @saad-ali

build error due to csi in container-storage-interface API changed

Anyone know how to work around this issue?

root@andy-dev:~/go/src/github.com/kubernetes-csi/drivers# make hostpath
if [ ! -d ./vendor ]; then dep ensure; fi
go build -i -o _output/hostpathplugin ./app/hostpathplugin
# github.com/kubernetes-csi/drivers/pkg/csi-common
pkg/csi-common/nodeserver-default.go:47:66: undefined: csi.NodeGetIdRequest
pkg/csi-common/nodeserver-default.go:47:90: undefined: csi.NodeGetIdResponse
pkg/csi-common/nodeserver-default.go:55:10: undefined: csi.NodeGetIdResponse
pkg/csi-common/utils.go:55:8: cannot use major (type int32) as type uint32 in field value
pkg/csi-common/utils.go:56:8: cannot use minor (type int32) as type uint32 in field value
pkg/csi-common/utils.go:57:8: cannot use patch (type int32) as type uint32 in field value
Makefile:30: recipe for target 'hostpath' failed
make: *** [hostpath] Error 2

Using master branch of github.com/container-storage-interface/spec/lib/go/csi is incorrect now since csi api has changed.
@rootfs

Need to pick up GetPluginCapabilities

need to pick up GetPluginCapabilities per container-storage-interface/spec#189
otherwise, following error occurs
@chakri-nelluri

vendor/github.com/kubernetes-csi/drivers/pkg/csi-common/utils.go:97:9: cannot use ids (type *DefaultIdentityServer) as type csi.IdentityServer in argument to s.Start:
        *DefaultIdentityServer does not implement csi.IdentityServer (missing GetPluginCapabilities method)
vendor/github.com/kubernetes-csi/drivers/pkg/csi-common/utils.go:105:9: cannot use ids (type *DefaultIdentityServer) as type csi.IdentityServer in argument to s.Start:
        *DefaultIdentityServer does not implement csi.IdentityServer (missing GetPluginCapabilities method)
vendor/github.com/kubernetes-csi/drivers/pkg/csi-common/utils.go:113:9: cannot use ids (type *DefaultIdentityServer) as type csi.IdentityServer in argument to s.Start:
        *DefaultIdentityServer does not implement csi.IdentityServer (missing GetPluginCapabilities method)

Hostpath driver doesn't support to specify uid/gid

I am trying hostpath driver with csc library,

  1. Create volume
./csc controller new --endpoint tcp://127.0.0.1:10000 --cap MULTI_NODE_MULTI_WRITER,mount,xfs,uid=1001,gid=1001 testVOL
  1. Node publish
./csc node publish --endpoint tcp://127.0.0.1:10000 --cap MULTI_NODE_MULTI_WRITER,mount,xfs,uid=1001,gid=1001 --target-path /mnt/testvol 32e71097-b4d5-11e8-aa53-026b17aa1190
  1. Check mount point
ls -ld /mnt/testvol
drwxr-xr-x. 2 root root 6 Sep 10 08:40 /mnt/testvol

but the mount point was created and owned by root:root, the normal user who runs step 1 and 2 doesn't have write access. It looks like the hostpath driver doesn't recognize uid/gid I specified in the commandline.

Reorganization of drivers repo

Overview:
This repo was first created to be a location for example, non-production, drivers. Just a location on how they may be created. After some time, it has turned into a repo for real drivers. For this reason, these drivers should move onto their own repo with their own release cycles.

Proposal:
Here are a set of the proposals:

  • First, make sure we tag and branch to keep around the older stuff.
  • Rename drivers to driver-hostpath repo.
  • Remove cinder, csi-common, flexadapter, iscsi, and nfs drivers and packages.
  • Cleanup the documentation to just be the repo for hostpath and point to the csi-sanity mock driver as another example.

Automated build system for drivers

We need a automated build system for drivers. Today, we have manual steps to build a docker image, push it, update deployment manifests to reflect it.

Opening an issue to update the build system to handle this gracefully.

NFS Driver : What is in local-up-cluster.sh

NFS driver README mentions hack/local-up-cluster.sh but I cannot locate it. What is supposed to be in that file?

Example local-up-cluster.sh
ALLOW_PRIVILEGED=true FEATURE_GATES=CSIPersistentVolume=true,MountPropagation=true RUNTIME_CONFIG="storage.k8s.io/v1alpha1=true" LOG_LEVEL=5 hack/local-up-cluster.sh

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.