diff --git a/.gitignore b/.gitignore index 39a104a26f..e090af9bad 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ _testmain.go *.test *.prof +/deploy/iso/minikube-iso/board/coreos/minikube/rootfs-overlay/usr/bin/auto-pause /deploy/kicbase/auto-pause /deploy/addons/auto-pause/auto-pause-hook /out diff --git a/Makefile b/Makefile index c4d12657c5..fba4934dce 100644 --- a/Makefile +++ b/Makefile @@ -261,7 +261,7 @@ out/e2e-%: out/minikube-% out/e2e-windows-amd64.exe: out/e2e-windows-amd64 cp $< $@ -minikube_iso: # old target kept for making tests happy +minikube_iso: deploy/iso/minikube-iso/board/coreos/minikube/rootfs-overlay/usr/bin/auto-pause # build minikube iso echo $(ISO_VERSION) > deploy/iso/minikube-iso/board/coreos/minikube/rootfs-overlay/etc/VERSION if [ ! -d $(BUILD_DIR)/buildroot ]; then \ mkdir -p $(BUILD_DIR); \ @@ -834,6 +834,11 @@ out/mkcmp: deploy/kicbase/auto-pause: $(SOURCE_GENERATED) $(SOURCE_FILES) GOOS=linux GOARCH=$(GOARCH) go build -o $@ cmd/auto-pause/auto-pause.go +.PHONY: deploy/iso/minikube-iso/board/coreos/minikube/rootfs-overlay/usr/bin/auto-pause # auto pause binary to be used for ISO +deploy/iso/minikube-iso/board/coreos/minikube/rootfs-overlay/usr/bin/auto-pause: $(SOURCE_GENERATED) $(SOURCE_FILES) + GOOS=linux GOARCH=$(GOARCH) go build -o $@ cmd/auto-pause/auto-pause.go + + .PHONY: deploy/addons/auto-pause/auto-pause-hook deploy/addons/auto-pause/auto-pause-hook: $(SOURCE_GENERATED) ## Build auto-pause hook addon $(if $(quiet),@echo " GO $@") diff --git a/pkg/addons/addons_autopause.go b/pkg/addons/addons_autopause.go index 936f51ff07..054ad00a58 100644 --- a/pkg/addons/addons_autopause.go +++ b/pkg/addons/addons_autopause.go @@ -43,8 +43,8 @@ func enableOrDisableAutoPause(cc *config.ClusterConfig, name string, val string) out.Infof("auto-pause addon is an alpha feature and still in early development. Please file issues to help us make it better.") out.Infof("https://github.com/kubernetes/minikube/labels/co%2Fauto-pause") - if !driver.IsKIC(cc.Driver) || runtime.GOARCH != "amd64" { - exit.Message(reason.Usage, `auto-pause currently is only supported on docker driver/docker runtime/amd64. Track progress of others here: https://github.com/kubernetes/minikube/issues/10601`) + if cc.KubernetesConfig.ContainerRuntime != "docker" || runtime.GOARCH != "amd64" { + exit.Message(reason.Usage, `auto-pause currently is only supported on docker runtime and amd64. Track progress of others here: https://github.com/kubernetes/minikube/issues/10601`) } co := mustload.Running(cc.Name) if enable {