Skip to content

Commit 071193d

Browse files
committed
add concise first line to comment block
1 parent d130ed8 commit 071193d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/minikube/assets/addons.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -902,11 +902,11 @@ func GenerateTemplateData(addon *Addon, cc *config.ClusterConfig, netInfo Networ
902902
opts.Registries[name] = "" // Avoid nil access when rendering
903903
}
904904

905+
// tl;dr If the user specified a custom image remove the default registry
905906
// Without the line below, if you try to overwrite an image the default registry is still used in the templating
906907
// Example - image name: MetricsScraper, default registry: docker.io, default image: kubernetesui/metrics-scraper
907908
// Passed on addon enable: --images=MetricsScraper=k8s.gcr.io/echoserver:1.4
908909
// Without this line the resulting image would be docker.io/k8s.gcr.io/echoserver:1.4
909-
// Therefore, if the user specified a custom image remove the default registry
910910
if _, ok := cc.CustomAddonImages[name]; ok {
911911
opts.Registries[name] = ""
912912
}

0 commit comments

Comments
 (0)