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