skip checking

This commit is contained in:
Chris Lu 2020-06-09 22:34:26 -07:00
parent 07ddad4e1a
commit db2c12b1bc
4 changed files with 27 additions and 14 deletions

View File

@ -1,7 +1,7 @@
.PHONY: build container clean
REGISTRY_NAME=seaweedfs
IMAGE_NAME=csi
REGISTRY_NAME=chrislusf
IMAGE_NAME=seaweedfs-csi-driver
VERSION ?= dev
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(VERSION)
COMMIT ?= $(shell git rev-parse --short HEAD)

View File

@ -10,19 +10,19 @@
## Utilize exiting SeaweedFS storage for your Kubernetes cluster (bare metal)
1. Git clone this repository and add your SeaweedFS master IP to `deploy/kubernetes/seaweeedfs-csi.yaml` (2 places)
1. Git clone this repository and add your SeaweedFS master IP to `deploy/kubernetes/seaweedfs-csi.yaml` (2 places)
2. Apply the container storage interface for SeaweedFS for your cluster
```
$ kubectl apply -f deploy/kubernetes/seaweeedfs-csi.yaml
$ kubectl apply -f deploy/kubernetes/seaweedfs-csi.yaml
```
3. Ensure all the containers are ready and running
```
$ kubectl get po -n kube-system
```
4. Testing: Create a persistant volume claim for 5GiB with name `seaweeedfs-csi-pvc` with storage class `seaweeedfs-storage`. The value, 5Gib does not have any significance as for SeaweedFS the whole filesystem is mounted into the container.
4. Testing: Create a persistant volume claim for 5GiB with name `seaweedfs-csi-pvc` with storage class `seaweedfs-storage`. The value, 5Gib does not have any significance as for SeaweedFS the whole filesystem is mounted into the container.
```
$ kubectl apply -f deploy/kubernetes/sample-seaweeedfs-pvc.yaml
$ kubectl apply -f deploy/kubernetes/sample-seaweedfs-pvc.yaml
```
5. Verify if the persistant volume claim exists and wait until its the STATUS is `Bound`
```
@ -39,8 +39,8 @@ $ kubectl exec my-csi-app -- df -h
8. Clean up
```
$ kubectl delete -f deploy/kubernetes/sample-busybox-pod.yaml
$ kubectl delete -f deploy/kubernetes/sample-seaweeedfs-pvc.yaml
$ kubectl delete -f deploy/kubernetes/seaweeedfs-csi.yaml
$ kubectl delete -f deploy/kubernetes/sample-seaweedfs-pvc.yaml
$ kubectl delete -f deploy/kubernetes/seaweedfs-csi.yaml
```
# Developing and contributing
@ -56,7 +56,7 @@ make test
# Miscelleneous
| Description | Command |
| ------------- |:------------- |
|Docker command for launching seaweeedfs|`docker run --cap-add SYS_ADMIN --security-opt apparmor:unconfined -v /dev/fuse:/dev/fuse --privileged -it seaweedfs /bin/bash`
|Docker command for launching seaweedfs|`docker run --cap-add SYS_ADMIN --security-opt apparmor:unconfined -v /dev/fuse:/dev/fuse --privileged -it seaweedfs /bin/bash`
# License
[Apache v2 license](https://www.apache.org/licenses/LICENSE-2.0)

View File

@ -228,11 +228,14 @@ roleRef:
apiGroup: rbac.authorization.k8s.io
---
kind: StatefulSet
apiVersion: apps/v1beta1
apiVersion: apps/v1
metadata:
name: csi-seaweedfs-controller
namespace: kube-system
spec:
selector:
matchLabels:
app: csi-seaweedfs-controller
serviceName: "csi-seaweedfs"
replicas: 1
template:
@ -290,11 +293,16 @@ spec:
args :
- "--endpoint=$(CSI_ENDPOINT)"
- "--filer=$(SEAWEEDFS_FILER)"
- "--nodeid=$(NODE_ID)"
env:
- name: CSI_ENDPOINT
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
- name: SEAWEEDFS_FILER
value: "192.X.X.X:8888" # host and port of your SeaweedFs filer
value: "192.168.2.7:8888" # host and port of your SeaweedFs filer
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
imagePullPolicy: "Always"
volumeMounts:
- name: socket-dir
@ -304,7 +312,7 @@ spec:
emptyDir: {}
---
kind: DaemonSet
apiVersion: apps/v1beta2
apiVersion: apps/v1
metadata:
name: csi-seaweedfs-node
namespace: kube-system
@ -352,11 +360,16 @@ spec:
args :
- "--endpoint=$(CSI_ENDPOINT)"
- "--filer=$(SEAWEEDFS_FILER)"
- "--nodeid=$(NODE_ID)"
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: SEAWEEDFS_FILER
value: "192.X.X.X:8888" # host and port of your SeaweedFs filer
value: "192.168.2.7:8888" # host and port of your SeaweedFs filer
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: plugin-dir

View File

@ -30,7 +30,7 @@ func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
return nil, status.Error(codes.InvalidArgument, "Volume capability missing in request")
}
if !isValidVolumeCapabilities(ns.Driver.vcap, []*csi.VolumeCapability{req.GetVolumeCapability()}) {
return nil, status.Error(codes.InvalidArgument, "Volume capability not supported")
// return nil, status.Error(codes.InvalidArgument, "Volume capability not supported")
}
if volumeID == "" {
return nil, status.Error(codes.InvalidArgument, "Volume ID missing in request")