Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Remove snapshot class creation in deploy script #104

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.14/hostpath/csi-hostpath-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
name: csi-data-dir

- name: hostpath
image: quay.io/k8scsi/hostpathplugin:v1.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't downgrade the version, please.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, I didn't see a published v1.2.0 here:
https://quay.io/repository/k8scsi/hostpathplugin?tag=v1.2.0&tab=tags

so I'm just testing with this version.

image: quay.io/k8scsi/hostpathplugin:v1.2.0-rc8
args:
- "--drivername=hostpath.csi.k8s.io"
- "--v=5"
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.15/hostpath/csi-hostpath-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
name: csi-data-dir

- name: hostpath
image: quay.io/k8scsi/hostpathplugin:v1.2.0
image: quay.io/k8scsi/hostpathplugin:v1.2.0-rc8
args:
- "--drivername=hostpath.csi.k8s.io"
- "--v=5"
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.16/hostpath/csi-hostpath-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
name: csi-data-dir

- name: hostpath
image: quay.io/k8scsi/hostpathplugin:v1.2.0
image: quay.io/k8scsi/hostpathplugin:v1.2.0-rc8
args:
- "--drivername=hostpath.csi.k8s.io"
- "--v=5"
Expand Down
12 changes: 6 additions & 6 deletions deploy/util/deploy-hostpath.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,14 @@ for component in CSI_PROVISIONER CSI_ATTACHER CSI_SNAPSHOTTER CSI_RESIZER; do
run kubectl apply -f "${current}"
done

# deploy hostpath plugin and registrar sidecar
# deploy hostpath plugin and CSI sidecars
echo "deploying hostpath components"
for i in $(ls ${BASE_DIR}/hostpath/*.yaml | sort); do
echo " $i"
if [[ $i == *"snapshotter"* ]] ; then
continue
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I understand this correctly? The following files are all going to be ignored during deployment?

deploy/kubernetes-1.14/hostpath/csi-hostpath-snapshotter.yaml
deploy/kubernetes-1.15/hostpath/csi-hostpath-snapshotter.yaml
deploy/kubernetes-1.16/hostpath/csi-hostpath-snapshotter.yaml

That doesn't look right. It breaks the entire example in https://github.com/kubernetes-csi/csi-driver-host-path#snapshot-support

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, still a WIP - the csi-snapshotter uses deploy-hostpath.sh for prow.sh. There was a suggestion that the snapshotter deployment might be causing some issues. I don't think it's the case after some testing.

I'll remove the WIP tag when this is ready for review


modified="$(cat "$i" | while IFS= read -r line; do
nocomments="$(echo "$line" | sed -e 's/ *#.*$//')"
if echo "$nocomments" | grep -q '^[[:space:]]*image:[[:space:]]*'; then
Expand Down Expand Up @@ -151,7 +155,7 @@ done
# for: the expectation is that we run attacher, provisioner,
# snapshotter, resizer, socat and hostpath plugin in the default namespace.
cnt=0
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
while [ $(kubectl get pods 2>/dev/null | grep '^csi-hostpath.* Running ' | wc -l) -lt 4 ]; do
if [ $cnt -gt 30 ]; then
echo "Running pods:"
kubectl describe pods
Expand All @@ -163,7 +167,3 @@ while [ $(kubectl get pods 2>/dev/null | grep '^csi-hostpath.* Running ' | wc -l
cnt=$(($cnt + 1))
sleep 10
done

# deploy snapshotclass
echo "deploying snapshotclass"
kubectl apply -f ${BASE_DIR}/snapshotter/csi-hostpath-snapshotclass.yaml