diff --git a/Makefile b/Makefile index 38d46b9071ec..7e4ca125769c 100644 --- a/Makefile +++ b/Makefile @@ -600,6 +600,33 @@ kic-base-image: ## builds the kic base image and tags local/kicbase:latest and l docker tag local/kicbase:$(KIC_VERSION) local/kicbase:latest docker tag local/kicbase:$(KIC_VERSION) local/kicbase:$(KIC_VERSION)-$(COMMIT_SHORT) +# multi-arch docker images +X_DOCKER_BUILDER ?= minikube-builder +X_BUILD_ENV ?= DOCKER_CLI_EXPERIMENTAL=enabled + +.PHONY: docker-multi-arch-builder +docker-multi-arch-builder: + env $(X_BUILD_ENV) docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + env $(X_BUILD_ENV) docker buildx rm --builder $(X_DOCKER_BUILDER) || true + env $(X_BUILD_ENV) docker buildx create --name kicbase-builder --buildkitd-flags '--debug' --use || true + +KICBASE_ARCH = linux/arm64,linux/amd64 +KICBASE_IMAGE_REGISTRIES ?= $(REGISTRY)/kicbase:$(KIC_VERSION) $(REGISTRY_GH)/kicbase:$(KIC_VERSION) kicbase/stable:$(KIC_VERSION) + +.PHONY: push-kic-base-image +push-kic-base-image: docker-multi-arch-builder ## Push multi-arch local/kicbase:latest to all remote registries +ifdef AUTOPUSH + docker login gcr.io/k8s-minikube + docker login docker.pkg.github.com + docker login +endif + $(foreach REG,$(KICBASE_IMAGE_REGISTRIES), \ + @docker pull $(REG) && echo "Image already exist in registry" && exit 1 || echo "Image doesn't exist in registry";) +ifndef AUTOPUSH + $(call user_confirm, 'Are you sure you want to push $(KICBASE_IMAGE_REGISTRIES) ?') +endif + env $(X_BUILD_ENV) docker buildx build --platform $(KICBASE_ARCH) $(addprefix -t ,$(KICBASE_IMAGE_REGISTRIES)) --push --build-arg COMMIT_SHA=${VERSION}-$(COMMIT) ./deploy/kicbase + .PHONY: upload-preloaded-images-tar upload-preloaded-images-tar: out/minikube # Upload the preloaded images for oldest supported, newest supported, and default kubernetes versions to GCS. go build -ldflags="$(MINIKUBE_LDFLAGS)" -o out/upload-preload ./hack/preload-images/*.go @@ -648,8 +675,8 @@ push-kic-base-image-hub: kic-base-image ## Push kic-base to docker hub docker tag local/kicbase:latest $(KIC_BASE_IMAGE_HUB) $(MAKE) push-docker IMAGE=$(KIC_BASE_IMAGE_HUB) -.PHONY: push-kic-base-image -push-kic-base-image: ## Push local/kicbase:latest to all remote registries +.PHONY: push-kic-base-image-x86-deprecated +push-kic-base-image-x86-deprecated: ## Push legacy, non-multiarch local/kicbase:latest to all remote registries ifndef AUTOPUSH $(call user_confirm, 'Are you sure you want to push: $(KIC_BASE_IMAGE_GH) & $(KIC_BASE_IMAGE_GCR) & $(KIC_BASE_IMAGE_HUB) ?') $(MAKE) push-kic-base-image AUTOPUSH=true @@ -818,3 +845,4 @@ else export UPDATE_TARGET="all" && \ go run update_kubernetes_version.go) endif + diff --git a/pkg/drivers/kic/types.go b/pkg/drivers/kic/types.go index e060fec10b1c..f126f6fe8f4b 100644 --- a/pkg/drivers/kic/types.go +++ b/pkg/drivers/kic/types.go @@ -24,9 +24,9 @@ import ( const ( // Version is the current version of kic - Version = "v0.0.15-snapshot4" + Version = "v0.0.16-snapshot1" // SHA of the kic base image - baseImageSHA = "ef1f485b5a1cfa4c989bc05e153f0a8525968ec999e242efff871cbb31649c16" + baseImageSHA = "dff16232547bb3ac3f2a9e09a42246a96ecf8f40d9a1c5bcf5a37953690954b6" ) var ( diff --git a/pkg/minikube/registry/drvs/docker/docker.go b/pkg/minikube/registry/drvs/docker/docker.go index 548e4daf14ab..294413f70163 100644 --- a/pkg/minikube/registry/drvs/docker/docker.go +++ b/pkg/minikube/registry/drvs/docker/docker.go @@ -84,7 +84,7 @@ func configure(cc config.ClusterConfig, n config.Node) (interface{}, error) { } func status() registry.State { - if runtime.GOARCH != "amd64" { + if runtime.GOARCH != "amd64" && runtime.GOARCH != "arm64" { return registry.State{Error: fmt.Errorf("docker driver is not supported on %q systems yet", runtime.GOARCH), Installed: false, Healthy: false, Fix: "Try other drivers", Doc: docURL} } diff --git a/site/content/en/docs/commands/start.md b/site/content/en/docs/commands/start.md index aac90df39d8b..fe1ae8953982 100644 --- a/site/content/en/docs/commands/start.md +++ b/site/content/en/docs/commands/start.md @@ -26,7 +26,7 @@ minikube start [flags] --apiserver-names strings A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine --apiserver-port int The apiserver listening port (default 8443) --auto-update-drivers If set, automatically updates drivers to the latest version. Defaults to true. (default true) - --base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase:v0.0.15-snapshot4@sha256:ef1f485b5a1cfa4c989bc05e153f0a8525968ec999e242efff871cbb31649c16") + --base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase:v0.0.16-snapshot1@sha256:dff16232547bb3ac3f2a9e09a42246a96ecf8f40d9a1c5bcf5a37953690954b6") --cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none. (default true) --cni string CNI plug-in to use. Valid options: auto, bridge, calico, cilium, flannel, kindnet, or path to a CNI manifest (default: auto) --container-runtime string The container runtime to be used (docker, cri-o, containerd). (default "docker")