File tree 5 files changed +42
-12
lines changed
5 files changed +42
-12
lines changed Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ $ ./deploy/kubernetes/deploy_driver.sh
14
14
```
15
15
3. Create example PVC and Pod
16
16
```
17
- $ kubectl create -f ./examples/demo-pod.yaml
17
+ $ kubectl apply -f ./examples/demo-pod.yaml
18
18
```
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- kubectl delete -f node.yaml
4
- kubectl delete -f controller.yaml
3
+ set -o nounset
4
+ set -o errexit
5
+
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
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- source ./common.sh
3
- kubectl create secret generic cloud-sa --from-file=$SA_FILE
4
- kubectl create -f setup-cluster.yaml
5
- kubectl create -f node.yaml
6
- kubectl create -f controller.yaml
2
+
3
+ set -o nounset
4
+ set -o errexit
5
+
6
+ if ! kubectl get secret cloud-sa;
7
+ then
8
+ kubectl create secret generic cloud-sa --from-file=" ${SA_FILE} "
9
+ fi
10
+ kubectl apply -f setup-cluster.yaml
11
+ kubectl apply -f node.yaml
12
+ kubectl apply -f controller.yaml
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- IAM_NAME=" $GCEPD_SA_NAME @$PROJECT .iam.gserviceaccount.com"
4
- gcloud iam service-accounts create $GCEPD_SA_NAME
5
- gcloud iam service-accounts keys create $SA_FILE --iam-account $IAM_NAME
6
- gcloud projects add-iam-policy-binding $PROJECT --member serviceAccount:$IAM_NAME --role roles/compute.storageAdmin roles/compute.admin
3
+ set -o nounset
4
+ set -o errexit
5
+
6
+ IAM_NAME=" ${GCEPD_SA_NAME} @${PROJECT} .iam.gserviceaccount.com"
7
+
8
+ # Cleanup old Service Account and Key
9
+ rm -f " ${SA_FILE} "
10
+ gcloud iam service-accounts delete " ${IAM_NAME} " --quiet
11
+ # TODO: Delete ALL policy bindings
12
+
13
+ # Create new Service Account and Keys
14
+ gcloud iam service-accounts create " ${GCEPD_SA_NAME} "
15
+ gcloud iam service-accounts keys create " ${SA_FILE} " --iam-account " ${IAM_NAME} "
16
+ # TODO: Reduce scope of role to only what it necessary when cloud IAM fixes bugs.
17
+ gcloud projects add-iam-policy-binding " ${PROJECT} " --member serviceAccount:" ${IAM_NAME} " --role roles/owner
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+ set -x
5
+
6
+ readonly PKGDIR=github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver
7
+
8
+ go test -timeout 30s " ${PKGDIR} /test/sanity/" -run ^TestSanity$
9
+ go run " $GOPATH /src/${PKGDIR} /test/remote/run_remote/run_remote.go" --logtostderr --v 2 --project " ${PROJECT} " --zone " ${ZONE} " --ssh-env gce --delete-instances=false --cleanup=false --results-dir=my_test
You can’t perform that action at this time.
0 commit comments