Skip to content

Commit cdea91b

Browse files
committed
add comment on why we're mocking the registry
1 parent 16d74b2 commit cdea91b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,12 @@ func createPullSecret(clientset *kubernetes.Clientset, ns *corev1.Namespace, cre
119119
}
120120

121121
registries := append(gcr_config.DefaultGCRRegistries[:], gcr_config.DefaultARRegistries[:]...)
122-
// The MOCK_GOOGLE_TOKEN env var prevents using credentials to fetch the token. Instead the token will be mocked.
122+
123+
// The MOCK_GOOGLE_TOKEN env var prevents using credentials to fetch the
124+
// token. Instead the token will be mocked. It also sets a mock registry
125+
// due to pulls to Artifact Registry for publicly available images with
126+
// mock credentials causing unauthorized errors. See:
127+
// https://github.com/kubernetes/minikube/issues/19714
123128
mockToken, _ := strconv.ParseBool(os.Getenv("MOCK_GOOGLE_TOKEN"))
124129
var token *oauth2.Token
125130
if mockToken {

0 commit comments

Comments
 (0)