Skip to content

Commit

Permalink
Change example pv.yaml for new iscsi csi driver name
Browse files Browse the repository at this point in the history
Signed-off-by: Humble Chirammal <[email protected]>
  • Loading branch information
humblec committed May 31, 2021
1 parent a5362c2 commit b585bbe
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cmd/iscsiplugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func main() {
flag.CommandLine.Parse([]string{})

cmd := &cobra.Command{
Use: "ISCSI",
Use: "iscsi.csi.k8s.io",
Short: "CSI based ISCSI driver",
Run: func(cmd *cobra.Command, args []string) {
handle()
Expand Down
2 changes: 1 addition & 1 deletion deploy/csi-iscsi-driverinfo.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: storage.k8s.io/v1beta1
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: iscsi.csi.k8s.io
Expand Down
36 changes: 29 additions & 7 deletions deploy/csi-iscsi-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ spec:
cpu: 10m
memory: 20Mi
- name: node-driver-registrar
# This is necessary only for systems with SELinux, where
# non-privileged sidecar containers cannot access unix domain socket
# created by privileged CSI driver container.
securityContext:
privileged: true
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.1.0
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "rm -rf /registration/iscsi.csi.k8s.io /registration/iscsi.csi.k8s.io-reg.sock"]
args:
- --v=2
- --csi-address=/csi/csi.sock
Expand All @@ -63,7 +64,7 @@ spec:
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: quay.io/humble/csi-iscsi:v0.1
image: quay.io/humble/csi-iscsi:v0.2
args:
- "-v=5"
- "--nodeid=$(NODE_ID)"
Expand Down Expand Up @@ -94,6 +95,15 @@ spec:
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
- name: host-dev
mountPath: /dev
- name: host-sys
mountPath: /sys
- name: host-mount
mountPath: /run/mount
- name: lib-modules
mountPath: /lib/modules
readOnly: true
volumes:
- name: socket-dir
hostPath:
Expand All @@ -103,7 +113,19 @@ spec:
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- hostPath:
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry
type: Directory
name: registration-dir
- name: host-dev
hostPath:
path: /dev
- name: host-sys
hostPath:
path: /sys
- name: host-mount
hostPath:
path: /run/mount
- name: lib-modules
hostPath:
path: /lib/modules
6 changes: 3 additions & 3 deletions deploy/install-driver.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright 2020 The Kubernetes Authors.
# Copyright 2021 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,7 +33,7 @@ if [ $ver != "master" ]; then
repo="$repo/$ver"
fi

echo "Installing iscsi CSI driver, version: $ver ..."
echo "Installing iscsi.csi.k8s.io CSI driver, version: $ver ..."
kubectl apply -f $repo/csi-iscsi-driverinfo.yaml
kubectl apply -f $repo/csi-iscsi-node.yaml
echo 'iscsi CSI driver installed successfully.'
echo 'iscsi.csi.k8s.io CSI driver installed successfully.'
2 changes: 1 addition & 1 deletion examples/kubernetes/pv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
capacity:
storage: 1Gi
csi:
driver: ISCSI
driver: iscsi.csi.k8s.io
volumeHandle: iscsi-data-id
volumeAttributes:
targetPortal: "192.168.122.145:3260"
Expand Down

0 comments on commit b585bbe

Please sign in to comment.