File tree 4 files changed +30
-9
lines changed
4 files changed +30
-9
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
+ set -o nounset
4
+ set -o errexit
5
+
3
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
4
14
gcloud iam service-accounts create $GCEPD_SA_NAME
5
15
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
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
You can’t perform that action at this time.
0 commit comments