Skip to content

Commit e2ad5a9

Browse files
committed
Remove external-attacher and add CSIDriver
+ remove 1.13 manifests
1 parent 4b2c735 commit e2ad5a9

15 files changed

+35
-184
lines changed

deploy/kubernetes-1.13/README.md

-7
This file was deleted.

deploy/kubernetes-1.13/hostpath/csi-hostpath-attacher.yaml

-55
This file was deleted.

deploy/kubernetes-1.14/hostpath/csi-hostpath-attacher.yaml

-55
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: storage.k8s.io/v1beta1
2+
kind: CSIDriver
3+
metadata:
4+
name: hostpath.csi.k8s.io
5+
spec:
6+
attachRequired: false
7+
podInfoOnMount: false

deploy/kubernetes-1.15/hostpath/csi-hostpath-attacher.yaml

-55
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: storage.k8s.io/v1beta1
2+
kind: CSIDriver
3+
metadata:
4+
name: hostpath.csi.k8s.io
5+
spec:
6+
attachRequired: false
7+
podInfoOnMount: false

deploy/kubernetes-1.16/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The deployment for Kubernetes 1.16 uses CSI 1.0 and thus is
2+
incompatible with Kubernetes < 1.13.
3+
4+
The sidecars depend on 1.15 API changes for migration and resizing,
5+
and 1.14 API changes for CSIDriver and CSINode.
6+
However the hostpath driver doesn't use those features, so this
7+
deployment can work on older Kubernetes versions.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: storage.k8s.io/v1beta1
2+
kind: CSIDriver
3+
metadata:
4+
name: hostpath.csi.k8s.io
5+
spec:
6+
attachRequired: false
7+
podInfoOnMount: false

deploy/kubernetes-1.13/hostpath/csi-hostpath-plugin.yaml renamed to deploy/kubernetes-1.16/hostpath/csi-hostpath-plugin.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ spec:
107107
volumeMounts:
108108
- mountPath: /csi
109109
name: socket-dir
110-
image: quay.io/k8scsi/livenessprobe:v1.0.2
110+
image: quay.io/k8scsi/livenessprobe:v1.1.0
111111
args:
112112
- --csi-address=/csi/csi.sock
113113
- --connection-timeout=3s

deploy/kubernetes-1.13/hostpath/csi-hostpath-provisioner.yaml renamed to deploy/kubernetes-1.16/hostpath/csi-hostpath-provisioner.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
serviceAccountName: csi-provisioner
4141
containers:
4242
- name: csi-provisioner
43-
image: quay.io/k8scsi/csi-provisioner:v1.0.1
43+
image: quay.io/k8scsi/csi-provisioner:v1.3.0
4444
args:
4545
- -v=5
4646
- --csi-address=/csi/csi.sock

deploy/kubernetes-1.13/hostpath/csi-hostpath-snapshotter.yaml renamed to deploy/kubernetes-1.16/hostpath/csi-hostpath-snapshotter.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
serviceAccount: csi-snapshotter
4141
containers:
4242
- name: csi-snapshotter
43-
image: quay.io/k8scsi/csi-snapshotter:v1.0.1
43+
image: quay.io/k8scsi/csi-snapshotter:v1.2.0
4444
args:
4545
- -v=5
4646
- --csi-address=/csi/csi.sock

deploy/util/deploy-hostpath.sh

+4-9
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ BASE_DIR=$(dirname "$0")
1616
# If set, the following env variables override image registry and/or tag for each of the images.
1717
# They are named after the image name, with hyphen replaced by underscore and in upper case.
1818
#
19-
# - CSI_ATTACHER_REGISTRY
20-
# - CSI_ATTACHER_TAG
2119
# - CSI_NODE_DRIVER_REGISTRAR_REGISTRY
2220
# - CSI_NODE_DRIVER_REGISTRAR_TAG
2321
# - CSI_PROVISIONER_REGISTRY
@@ -56,7 +54,6 @@ function rbac_version () {
5654

5755
# get version from `image: quay.io/k8scsi/csi-attacher:v1.0.1`, ignoring comments
5856
version="$(sed -e 's/ *#.*$//' "$yaml" | grep "image:.*$image" | sed -e 's/ *#.*//' -e 's/.*://')"
59-
6057
if $update_rbac; then
6158
# apply overrides
6259
varname=$(echo $image | tr - _ | tr a-z A-Z)
@@ -75,8 +72,6 @@ function rbac_version () {
7572
# In addition, the RBAC rules can be overridden separately.
7673
CSI_PROVISIONER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-provisioner.yaml" csi-provisioner false)/deploy/kubernetes/rbac.yaml"
7774
: ${CSI_PROVISIONER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-provisioner.yaml" csi-provisioner "${UPDATE_RBAC_RULES}")/deploy/kubernetes/rbac.yaml}
78-
CSI_ATTACHER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-attacher/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-attacher.yaml" csi-attacher false)/deploy/kubernetes/rbac.yaml"
79-
: ${CSI_ATTACHER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-attacher/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-attacher.yaml" csi-attacher "${UPDATE_RBAC_RULES}")/deploy/kubernetes/rbac.yaml}
8075
CSI_SNAPSHOTTER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-snapshotter.yaml" csi-snapshotter false)/deploy/kubernetes/rbac.yaml"
8176
: ${CSI_SNAPSHOTTER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-snapshotter.yaml" csi-snapshotter "${UPDATE_RBAC_RULES}")/deploy/kubernetes/rbac.yaml}
8277

@@ -95,7 +90,7 @@ run () {
9590

9691
# rbac rules
9792
echo "applying RBAC rules"
98-
for component in CSI_PROVISIONER CSI_ATTACHER CSI_SNAPSHOTTER; do
93+
for component in CSI_PROVISIONER CSI_SNAPSHOTTER; do
9994
eval current="\${${component}_RBAC}"
10095
eval original="\${${component}_RBAC_YAML}"
10196
if [ "$current" != "$original" ]; then
@@ -146,10 +141,10 @@ done
146141
147142
# Wait until all pods are running. We have to make some assumptions
148143
# about the deployment here, otherwise we wouldn't know what to wait
149-
# for: the expectation is that we run attacher, provisioner,
150-
# snapshotter, socat and hostpath plugin in the default namespace.
144+
# for: the expectation is that we run provisioner, snapshotter,
145+
# socat and hostpath plugin in the default namespace.
151146
cnt=0
152-
while [ $(kubectl get pods 2>/dev/null | grep '^csi-hostpath.* Running ' | wc -l) -lt 5 ] || ! kubectl describe volumesnapshotclasses.snapshot.storage.k8s.io 2>/dev/null >/dev/null; do
147+
while [ $(kubectl get pods 2>/dev/null | grep '^csi-hostpath.* Running ' | wc -l) -lt 4 ] || ! kubectl describe volumesnapshotclasses.snapshot.storage.k8s.io 2>/dev/null >/dev/null; do
153148
if [ $cnt -gt 30 ]; then
154149
echo "Running pods:"
155150
kubectl describe pods

0 commit comments

Comments
 (0)