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
|
||||
|
||||
# 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
|
||||
|
||||
4
Makefile
4
Makefile
@ -14,7 +14,7 @@
|
||||
|
||||
REGISTRY_NAME=quay.io/k8scsi
|
||||
IMAGE_NAME=nfsplugin
|
||||
IMAGE_VERSION=canary
|
||||
IMAGE_VERSION=v1.0.0
|
||||
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(IMAGE_VERSION)
|
||||
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/
|
||||
|
||||
nfs-container: nfs
|
||||
docker build -t $(IMAGE_TAG) -f ./app/Dockerfile .
|
||||
docker build -t $(IMAGE_TAG) -f ./Dockerfile .
|
||||
|
||||
push: nfs-container
|
||||
docker push $(IMAGE_TAG)
|
||||
|
||||
@ -30,20 +30,20 @@ spec:
|
||||
serviceAccount: csi-attacher
|
||||
containers:
|
||||
- name: csi-attacher
|
||||
image: quay.io/k8scsi/csi-attacher:v0.3.0
|
||||
image: quay.io/k8scsi/csi-attacher:v1.0.1
|
||||
args:
|
||||
- "--v=5"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
||||
value: /csi/csi.sock
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||
mountPath: /csi
|
||||
|
||||
- name: nfs
|
||||
image: quay.io/k8scsi/nfsplugin:v0.3.0
|
||||
image: quay.io/k8scsi/nfsplugin:v1.0.0
|
||||
args :
|
||||
- "--nodeid=$(NODE_ID)"
|
||||
- "--endpoint=$(CSI_ENDPOINT)"
|
||||
@ -61,4 +61,3 @@ spec:
|
||||
volumes:
|
||||
- name: socket-dir
|
||||
emptyDir:
|
||||
|
||||
|
||||
@ -16,14 +16,17 @@ spec:
|
||||
serviceAccount: csi-nodeplugin
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: driver-registrar
|
||||
image: quay.io/k8scsi/driver-registrar:v0.3.0
|
||||
- name: node-driver-registrar
|
||||
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:
|
||||
- "--v=5"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- --v=5
|
||||
- --csi-address=/plugin/csi.sock
|
||||
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi-nfsplugin/csi.sock
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /plugin/csi.sock
|
||||
- name: KUBE_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
@ -31,13 +34,15 @@ spec:
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /plugin
|
||||
- name: registration-dir
|
||||
mountPath: /registration
|
||||
- name: nfs
|
||||
securityContext:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
allowPrivilegeEscalation: true
|
||||
image: quay.io/k8scsi/nfsplugin:v0.3.0
|
||||
image: quay.io/k8scsi/nfsplugin:v1.0.0
|
||||
args :
|
||||
- "--nodeid=$(NODE_ID)"
|
||||
- "--endpoint=$(CSI_ENDPOINT)"
|
||||
@ -64,3 +69,7 @@ spec:
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/pods
|
||||
type: Directory
|
||||
- hostPath:
|
||||
path: /var/lib/kubelet/plugins_registry
|
||||
type: Directory
|
||||
name: registration-dir
|
||||
|
||||
@ -27,8 +27,8 @@ type driver struct {
|
||||
csiDriver *csicommon.CSIDriver
|
||||
endpoint string
|
||||
|
||||
ids *csicommon.DefaultIdentityServer
|
||||
ns *nodeServer
|
||||
//ids *identityServer
|
||||
ns *nodeServer
|
||||
|
||||
cap []*csi.VolumeCapability_AccessMode
|
||||
cscap []*csi.ControllerServiceCapability
|
||||
@ -71,8 +71,9 @@ func (d *driver) Run() {
|
||||
s := csicommon.NewNonBlockingGRPCServer()
|
||||
s.Start(d.endpoint,
|
||||
csicommon.NewDefaultIdentityServer(d.csiDriver),
|
||||
// NFS plugin has not implemented ControllerServer.
|
||||
nil,
|
||||
// NFS plugin has not implemented ControllerServer
|
||||
// using default controllerserver.
|
||||
csicommon.NewDefaultControllerServer(d.csiDriver),
|
||||
NewNodeServer(d))
|
||||
s.Wait()
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user