Commit bf02e6a
committed
Fix(gcloud): Correct service account email format and improve creation
This commit addresses issues in the create-dpgce script related to
service account handling, particularly for domain-scoped projects.
- lib/env.sh:
- Correctly formats the service account email (GSA) for domain-scoped
projects (e.g., c9h.org:project-id) by including the domain
in the email address (e.g., [email protected]).
- lib/shared-functions.sh:
- Replaced `gcloud iam service-accounts describe` with `list --filter`
for a more reliable existence check, as describe was failing to find
existing service accounts.
- Added a retry loop for `gcloud projects add-iam-policy-binding`
to handle potential IAM propagation delays after service account
creation.
- Ensured the script exits if role bindings fail after multiple retries.
- Cleaned up role binding logic into a loop.
These changes ensure the script can reliably create and configure the
necessary service account and its IAM roles, unblocking cluster creation.1 parent cb0ced6 commit bf02e6a
2 files changed
+72
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
61 | 70 | | |
62 | 71 | | |
63 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
| 584 | + | |
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | 841 | | |
845 | | - | |
846 | | - | |
847 | | - | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
848 | 849 | | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
860 | 865 | | |
861 | | - | |
862 | | - | |
863 | | - | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
864 | 893 | | |
865 | | - | |
866 | | - | |
867 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
868 | 897 | | |
869 | | - | |
870 | | - | |
871 | | - | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
872 | 907 | | |
873 | 908 | | |
874 | 909 | | |
| |||
0 commit comments