Merge pull request #1436 from Teddy-Schmitz/registry-creds-gcrurl
Add gcrurl env var to registry-creds addon deployment and configurationpull/1736/head
commit
29a7d7119a
|
@ -53,6 +53,7 @@ var addonsConfigureCmd = &cobra.Command{
|
|||
dockerServer := "changeme"
|
||||
dockerUser := "changeme"
|
||||
dockerPass := "changeme"
|
||||
gcrURL := "https://gcr.io"
|
||||
|
||||
enableAWSECR := AskForYesNoConfirmation("\nDo you want to enable AWS Elastic Container Registry?", posResponses, negResponses)
|
||||
if enableAWSECR {
|
||||
|
@ -66,6 +67,11 @@ var addonsConfigureCmd = &cobra.Command{
|
|||
enableGCR := AskForYesNoConfirmation("\nDo you want to enable Google Container Registry?", posResponses, negResponses)
|
||||
if enableGCR {
|
||||
gcrPath := AskForStaticValue("-- Enter path to credentials (e.g. /home/user/.config/gcloud/application_default_credentials.json):")
|
||||
gcrchangeURL := AskForYesNoConfirmation("-- Do you want to change the GCR URL (Default https://gcr.io)?", posResponses, negResponses)
|
||||
|
||||
if gcrchangeURL {
|
||||
gcrURL = AskForStaticValue("-- Enter GCR URL (e.g. https://asia.gcr.io):")
|
||||
}
|
||||
|
||||
// Read file from disk
|
||||
dat, err := ioutil.ReadFile(gcrPath)
|
||||
|
@ -111,6 +117,7 @@ var addonsConfigureCmd = &cobra.Command{
|
|||
"registry-creds-gcr",
|
||||
map[string]string{
|
||||
"application_default_credentials.json": gcrApplicationDefaultCredentials,
|
||||
"gcrurl": gcrURL,
|
||||
},
|
||||
map[string]string{
|
||||
"app": "registry-creds",
|
||||
|
|
|
@ -65,6 +65,11 @@ spec:
|
|||
secretKeyRef:
|
||||
name: registry-creds-dpr
|
||||
key: DOCKER_PRIVATE_REGISTRY_USER
|
||||
- name: gcrurl
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: registry-creds-gcr
|
||||
key: gcrurl
|
||||
volumeMounts:
|
||||
- name: gcr-creds
|
||||
mountPath: "/root/.config/gcloud"
|
||||
|
@ -73,3 +78,7 @@ spec:
|
|||
- name: gcr-creds
|
||||
secret:
|
||||
secretName: registry-creds-gcr
|
||||
items:
|
||||
- key: "application_default_credentials.json"
|
||||
path: "application_default_credentials.json"
|
||||
|
||||
|
|
Loading…
Reference in New Issue