Skip to content

Commit aa101f7

Browse files
authored
Merge pull request #16 from davidz627/fix/deploymentScriptPaths
Make deploy scripts use absolute paths instead of relative paths
2 parents 8dc5223 + 777a578 commit aa101f7

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

deploy/kubernetes/delete-driver.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
set -o nounset
44
set -o errexit
55

6-
kubectl delete -f node.yaml --ignore-not-found
7-
kubectl delete -f controller.yaml --ignore-not-found
8-
kubectl delete -f setup-cluster.yaml --ignore-not-found
6+
readonly PKGDIR="${GOPATH}/src/github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver"
7+
readonly KUBEDEPLOY="${PKGDIR}/deploy/kubernetes"
8+
9+
kubectl delete -f "${KUBEDEPLOY}/node.yaml" --ignore-not-found
10+
kubectl delete -f "${KUBEDEPLOY}/controller.yaml" --ignore-not-found
11+
kubectl delete -f "${KUBEDEPLOY}/setup-cluster.yaml" --ignore-not-found
12+
kubectl delete secret cloud-sa --ignore-not-found

deploy/kubernetes/deploy-driver.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
set -o nounset
44
set -o errexit
55

6+
readonly PKGDIR="${GOPATH}/src/github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver"
7+
readonly KUBEDEPLOY="${PKGDIR}/deploy/kubernetes"
8+
69
if ! kubectl get secret cloud-sa;
710
then
811
kubectl create secret generic cloud-sa --from-file="${SA_FILE}"
912
fi
10-
kubectl apply -f setup-cluster.yaml
11-
kubectl apply -f node.yaml
12-
kubectl apply -f controller.yaml
13+
kubectl apply -f "${KUBEDEPLOY}/setup-cluster.yaml"
14+
kubectl apply -f "${KUBEDEPLOY}/node.yaml"
15+
kubectl apply -f "${KUBEDEPLOY}/controller.yaml"

0 commit comments

Comments
 (0)