Update deployment files and Dockerfile
Signed-off-by: prateekpandey14 <prateekpandey14@gmail.com>
This commit is contained in:
parent
9e60b2f3c8
commit
cb7d61a49d
@ -1,7 +1,7 @@
|
|||||||
FROM centos:7.4.1708
|
FROM centos:7.4.1708
|
||||||
|
|
||||||
# Copy nfsplugin from build _output directory
|
# Copy nfsplugin from build _output directory
|
||||||
COPY nfsplugin /nfsplugin
|
COPY _output/nfsplugin /nfsplugin
|
||||||
|
|
||||||
RUN yum -y install nfs-utils && yum -y install epel-release && yum -y install jq && yum clean all
|
RUN yum -y install nfs-utils && yum -y install epel-release && yum -y install jq && yum clean all
|
||||||
|
|
||||||
4
Makefile
4
Makefile
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
REGISTRY_NAME=quay.io/k8scsi
|
REGISTRY_NAME=quay.io/k8scsi
|
||||||
IMAGE_NAME=nfsplugin
|
IMAGE_NAME=nfsplugin
|
||||||
IMAGE_VERSION=canary
|
IMAGE_VERSION=v1.0.0
|
||||||
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(IMAGE_VERSION)
|
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(IMAGE_VERSION)
|
||||||
REV=$(shell git describe --long --tags --dirty)
|
REV=$(shell git describe --long --tags --dirty)
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ nfs:
|
|||||||
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/nfsplugin ./app/
|
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/nfsplugin ./app/
|
||||||
|
|
||||||
nfs-container: nfs
|
nfs-container: nfs
|
||||||
docker build -t $(IMAGE_TAG) -f ./app/Dockerfile .
|
docker build -t $(IMAGE_TAG) -f ./Dockerfile .
|
||||||
|
|
||||||
push: nfs-container
|
push: nfs-container
|
||||||
docker push $(IMAGE_TAG)
|
docker push $(IMAGE_TAG)
|
||||||
|
|||||||
@ -30,20 +30,20 @@ spec:
|
|||||||
serviceAccount: csi-attacher
|
serviceAccount: csi-attacher
|
||||||
containers:
|
containers:
|
||||||
- name: csi-attacher
|
- name: csi-attacher
|
||||||
image: quay.io/k8scsi/csi-attacher:v0.3.0
|
image: quay.io/k8scsi/csi-attacher:v1.0.1
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
env:
|
env:
|
||||||
- name: ADDRESS
|
- name: ADDRESS
|
||||||
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
value: /csi/csi.sock
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: socket-dir
|
- name: socket-dir
|
||||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
mountPath: /csi
|
||||||
|
|
||||||
- name: nfs
|
- name: nfs
|
||||||
image: quay.io/k8scsi/nfsplugin:v0.3.0
|
image: quay.io/k8scsi/nfsplugin:v1.0.0
|
||||||
args :
|
args :
|
||||||
- "--nodeid=$(NODE_ID)"
|
- "--nodeid=$(NODE_ID)"
|
||||||
- "--endpoint=$(CSI_ENDPOINT)"
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
@ -61,4 +61,3 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: socket-dir
|
- name: socket-dir
|
||||||
emptyDir:
|
emptyDir:
|
||||||
|
|
||||||
|
|||||||
@ -16,14 +16,17 @@ spec:
|
|||||||
serviceAccount: csi-nodeplugin
|
serviceAccount: csi-nodeplugin
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
containers:
|
containers:
|
||||||
- name: driver-registrar
|
- name: node-driver-registrar
|
||||||
image: quay.io/k8scsi/driver-registrar:v0.3.0
|
image: quay.io/k8scsi/csi-node-driver-registrar:v1.0.2
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
command: ["/bin/sh", "-c", "rm -rf /registration/csi-nfsplugin /registration/csi-nfsplugin-reg.sock"]
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- --v=5
|
||||||
- "--csi-address=$(ADDRESS)"
|
- --csi-address=/plugin/csi.sock
|
||||||
|
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi-nfsplugin/csi.sock
|
||||||
env:
|
env:
|
||||||
- name: ADDRESS
|
|
||||||
value: /plugin/csi.sock
|
|
||||||
- name: KUBE_NODE_NAME
|
- name: KUBE_NODE_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
@ -31,13 +34,15 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: plugin-dir
|
- name: plugin-dir
|
||||||
mountPath: /plugin
|
mountPath: /plugin
|
||||||
|
- name: registration-dir
|
||||||
|
mountPath: /registration
|
||||||
- name: nfs
|
- name: nfs
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
capabilities:
|
capabilities:
|
||||||
add: ["SYS_ADMIN"]
|
add: ["SYS_ADMIN"]
|
||||||
allowPrivilegeEscalation: true
|
allowPrivilegeEscalation: true
|
||||||
image: quay.io/k8scsi/nfsplugin:v0.3.0
|
image: quay.io/k8scsi/nfsplugin:v1.0.0
|
||||||
args :
|
args :
|
||||||
- "--nodeid=$(NODE_ID)"
|
- "--nodeid=$(NODE_ID)"
|
||||||
- "--endpoint=$(CSI_ENDPOINT)"
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
@ -64,3 +69,7 @@ spec:
|
|||||||
hostPath:
|
hostPath:
|
||||||
path: /var/lib/kubelet/pods
|
path: /var/lib/kubelet/pods
|
||||||
type: Directory
|
type: Directory
|
||||||
|
- hostPath:
|
||||||
|
path: /var/lib/kubelet/plugins_registry
|
||||||
|
type: Directory
|
||||||
|
name: registration-dir
|
||||||
|
|||||||
@ -27,8 +27,8 @@ type driver struct {
|
|||||||
csiDriver *csicommon.CSIDriver
|
csiDriver *csicommon.CSIDriver
|
||||||
endpoint string
|
endpoint string
|
||||||
|
|
||||||
ids *csicommon.DefaultIdentityServer
|
//ids *identityServer
|
||||||
ns *nodeServer
|
ns *nodeServer
|
||||||
|
|
||||||
cap []*csi.VolumeCapability_AccessMode
|
cap []*csi.VolumeCapability_AccessMode
|
||||||
cscap []*csi.ControllerServiceCapability
|
cscap []*csi.ControllerServiceCapability
|
||||||
@ -71,8 +71,9 @@ func (d *driver) Run() {
|
|||||||
s := csicommon.NewNonBlockingGRPCServer()
|
s := csicommon.NewNonBlockingGRPCServer()
|
||||||
s.Start(d.endpoint,
|
s.Start(d.endpoint,
|
||||||
csicommon.NewDefaultIdentityServer(d.csiDriver),
|
csicommon.NewDefaultIdentityServer(d.csiDriver),
|
||||||
// NFS plugin has not implemented ControllerServer.
|
// NFS plugin has not implemented ControllerServer
|
||||||
nil,
|
// using default controllerserver.
|
||||||
|
csicommon.NewDefaultControllerServer(d.csiDriver),
|
||||||
NewNodeServer(d))
|
NewNodeServer(d))
|
||||||
s.Wait()
|
s.Wait()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user