File tree 2 files changed +16
-0
lines changed
deploy/addons/registry-creds
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ var addonsConfigureCmd = &cobra.Command{
52
52
dockerServer := "changeme"
53
53
dockerUser := "changeme"
54
54
dockerPass := "changeme"
55
+ gcrURL := "https://gcr.io"
55
56
56
57
enableAWSECR := AskForYesNoConfirmation ("\n Do you want to enable AWS Elastic Container Registry?" , posResponses , negResponses )
57
58
if enableAWSECR {
@@ -64,6 +65,11 @@ var addonsConfigureCmd = &cobra.Command{
64
65
enableGCR := AskForYesNoConfirmation ("\n Do you want to enable Google Container Registry?" , posResponses , negResponses )
65
66
if enableGCR {
66
67
gcrPath := AskForStaticValue ("-- Enter path to credentials (e.g. /home/user/.config/gcloud/application_default_credentials.json):" )
68
+ gcrchangeURL := AskForYesNoConfirmation ("-- Do you want to change the GCR URL (Default https://gcr.io)?" , posResponses , negResponses )
69
+
70
+ if gcrchangeURL {
71
+ gcrURL = AskForStaticValue ("-- Enter GCR URL (e.g. https://asia.gcr.io):" )
72
+ }
67
73
68
74
// Read file from disk
69
75
dat , err := ioutil .ReadFile (gcrPath )
@@ -108,6 +114,7 @@ var addonsConfigureCmd = &cobra.Command{
108
114
"registry-creds-gcr" ,
109
115
map [string ]string {
110
116
"application_default_credentials.json" : gcrApplicationDefaultCredentials ,
117
+ "gcrurl" : gcrURL ,
111
118
},
112
119
map [string ]string {
113
120
"app" : "registry-creds" ,
Original file line number Diff line number Diff line change 60
60
secretKeyRef :
61
61
name : registry-creds-dpr
62
62
key : DOCKER_PRIVATE_REGISTRY_USER
63
+ - name : gcrurl
64
+ valueFrom :
65
+ secretKeyRef :
66
+ name : registry-creds-gcr
67
+ key : gcrurl
63
68
volumeMounts :
64
69
- name : gcr-creds
65
70
mountPath : " /root/.config/gcloud"
68
73
- name : gcr-creds
69
74
secret :
70
75
secretName : registry-creds-gcr
76
+ items :
77
+ - key : " application_default_credentials.json"
78
+ path : " application_default_credentials.json"
79
+
You can’t perform that action at this time.
0 commit comments