File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ import (
4343
4444const gcpAuth = "gcp-auth"
4545
46+ const gcpAuthScope = "https://www.googleapis.com/auth/cloud-platform"
47+
4648var (
4749 runtimeScheme = runtime .NewScheme ()
4850 codecs = serializer .NewCodecFactory (runtimeScheme )
@@ -79,7 +81,7 @@ func watchNamespaces() error {
7981
8082 // grab credentials from where GCP would normally look
8183 ctx := context .Background ()
82- creds , err := google .FindDefaultCredentials (ctx , "https://www.googleapis.com/auth/cloud-platform" )
84+ creds , err := google .FindDefaultCredentials (ctx , gcpAuthScope )
8385 if err != nil {
8486 return fmt .Errorf ("finding default credentials: %v" , err )
8587 }
@@ -170,7 +172,7 @@ func deletePullSecret(clientset *kubernetes.Clientset, ns corev1.Namespace) erro
170172
171173// refreshAllPullSecrets deletes and recreates image registry pull secrets for all namespaces
172174func refreshAllPullSecrets () error {
173- creds , err := google .FindDefaultCredentials (context .Background ())
175+ creds , err := google .FindDefaultCredentials (context .Background (), gcpAuthScope )
174176 if err != nil {
175177 return fmt .Errorf ("finding default credentials: %v" , err )
176178 }
You can’t perform that action at this time.
0 commit comments