skip checking
This commit is contained in:
parent
07ddad4e1a
commit
db2c12b1bc
4
Makefile
4
Makefile
@ -1,7 +1,7 @@
|
|||||||
.PHONY: build container clean
|
.PHONY: build container clean
|
||||||
|
|
||||||
REGISTRY_NAME=seaweedfs
|
REGISTRY_NAME=chrislusf
|
||||||
IMAGE_NAME=csi
|
IMAGE_NAME=seaweedfs-csi-driver
|
||||||
VERSION ?= dev
|
VERSION ?= dev
|
||||||
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(VERSION)
|
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(VERSION)
|
||||||
COMMIT ?= $(shell git rev-parse --short HEAD)
|
COMMIT ?= $(shell git rev-parse --short HEAD)
|
||||||
|
|||||||
14
README.md
14
README.md
@ -10,19 +10,19 @@
|
|||||||
|
|
||||||
## Utilize exiting SeaweedFS storage for your Kubernetes cluster (bare metal)
|
## 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
|
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
|
3. Ensure all the containers are ready and running
|
||||||
```
|
```
|
||||||
$ kubectl get po -n kube-system
|
$ 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`
|
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
|
8. Clean up
|
||||||
```
|
```
|
||||||
$ kubectl delete -f deploy/kubernetes/sample-busybox-pod.yaml
|
$ kubectl delete -f deploy/kubernetes/sample-busybox-pod.yaml
|
||||||
$ kubectl delete -f deploy/kubernetes/sample-seaweeedfs-pvc.yaml
|
$ kubectl delete -f deploy/kubernetes/sample-seaweedfs-pvc.yaml
|
||||||
$ kubectl delete -f deploy/kubernetes/seaweeedfs-csi.yaml
|
$ kubectl delete -f deploy/kubernetes/seaweedfs-csi.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
# Developing and contributing
|
# Developing and contributing
|
||||||
@ -56,7 +56,7 @@ make test
|
|||||||
# Miscelleneous
|
# Miscelleneous
|
||||||
| Description | Command |
|
| 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
|
# License
|
||||||
[Apache v2 license](https://www.apache.org/licenses/LICENSE-2.0)
|
[Apache v2 license](https://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
|||||||
@ -228,11 +228,14 @@ roleRef:
|
|||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
---
|
---
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
apiVersion: apps/v1beta1
|
apiVersion: apps/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: csi-seaweedfs-controller
|
name: csi-seaweedfs-controller
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
spec:
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: csi-seaweedfs-controller
|
||||||
serviceName: "csi-seaweedfs"
|
serviceName: "csi-seaweedfs"
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
@ -290,11 +293,16 @@ spec:
|
|||||||
args :
|
args :
|
||||||
- "--endpoint=$(CSI_ENDPOINT)"
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
- "--filer=$(SEAWEEDFS_FILER)"
|
- "--filer=$(SEAWEEDFS_FILER)"
|
||||||
|
- "--nodeid=$(NODE_ID)"
|
||||||
env:
|
env:
|
||||||
- name: CSI_ENDPOINT
|
- name: CSI_ENDPOINT
|
||||||
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
|
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
|
||||||
- name: SEAWEEDFS_FILER
|
- 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"
|
imagePullPolicy: "Always"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: socket-dir
|
- name: socket-dir
|
||||||
@ -304,7 +312,7 @@ spec:
|
|||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
---
|
---
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
apiVersion: apps/v1beta2
|
apiVersion: apps/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: csi-seaweedfs-node
|
name: csi-seaweedfs-node
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
@ -352,11 +360,16 @@ spec:
|
|||||||
args :
|
args :
|
||||||
- "--endpoint=$(CSI_ENDPOINT)"
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
- "--filer=$(SEAWEEDFS_FILER)"
|
- "--filer=$(SEAWEEDFS_FILER)"
|
||||||
|
- "--nodeid=$(NODE_ID)"
|
||||||
env:
|
env:
|
||||||
- name: CSI_ENDPOINT
|
- name: CSI_ENDPOINT
|
||||||
value: unix:///csi/csi.sock
|
value: unix:///csi/csi.sock
|
||||||
- name: SEAWEEDFS_FILER
|
- 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"
|
imagePullPolicy: "IfNotPresent"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: plugin-dir
|
- name: plugin-dir
|
||||||
|
|||||||
@ -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")
|
return nil, status.Error(codes.InvalidArgument, "Volume capability missing in request")
|
||||||
}
|
}
|
||||||
if !isValidVolumeCapabilities(ns.Driver.vcap, []*csi.VolumeCapability{req.GetVolumeCapability()}) {
|
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 == "" {
|
if volumeID == "" {
|
||||||
return nil, status.Error(codes.InvalidArgument, "Volume ID missing in request")
|
return nil, status.Error(codes.InvalidArgument, "Volume ID missing in request")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user