Skip to content

Commit

Permalink
add comment on why we're mocking the registry
Browse files Browse the repository at this point in the history
  • Loading branch information
spowelljr committed Oct 10, 2024
1 parent 16d74b2 commit cdea91b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@ func createPullSecret(clientset *kubernetes.Clientset, ns *corev1.Namespace, cre
}

registries := append(gcr_config.DefaultGCRRegistries[:], gcr_config.DefaultARRegistries[:]...)
// The MOCK_GOOGLE_TOKEN env var prevents using credentials to fetch the token. Instead the token will be mocked.

// The MOCK_GOOGLE_TOKEN env var prevents using credentials to fetch the
// token. Instead the token will be mocked. It also sets a mock registry
// due to pulls to Artifact Registry for publicly available images with
// mock credentials causing unauthorized errors. See:
// https://github.com/kubernetes/minikube/issues/19714
mockToken, _ := strconv.ParseBool(os.Getenv("MOCK_GOOGLE_TOKEN"))
var token *oauth2.Token
if mockToken {
Expand Down

0 comments on commit cdea91b

Please sign in to comment.