Skip to content

WIP: krunkit driver #20826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ KIC_VERSION ?= $(shell grep -E "Version =" pkg/drivers/kic/types.go | cut -d \"
HUGO_VERSION ?= $(shell grep -E "HUGO_VERSION = \"" netlify.toml | cut -d \" -f2)

# Default to .0 for higher cache hit rates, as build increments typically don't require new ISO versions
ISO_VERSION ?= v1.36.0
ISO_VERSION ?= v1.36.0-1748291054-20826

# Dashes are valid in semver, but not Linux packaging. Use ~ to delimit alpha/beta
DEB_VERSION ?= $(subst -,~,$(RAW_VERSION))
Expand Down Expand Up @@ -79,7 +79,7 @@ MINIKUBE_BUCKET ?= minikube/releases
MINIKUBE_UPLOAD_LOCATION := gs://${MINIKUBE_BUCKET}
MINIKUBE_RELEASES_URL=https://github.com/kubernetes/minikube/releases/download

KERNEL_VERSION ?= 5.10.207
KERNEL_VERSION ?= 6.6.92
# latest from https://github.com/golangci/golangci-lint/releases
# update this only by running `make update-golint-version`
GOLINT_VERSION ?= v2.1.5
Expand Down
17 changes: 15 additions & 2 deletions cmd/minikube/cmd/start_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func initMinikubeFlags() {
startCmd.Flags().String(network, "", "network to run minikube with. Used by docker/podman, qemu, kvm, and vfkit drivers. If left empty, minikube will create a new network.")
startCmd.Flags().StringVarP(&outputFormat, "output", "o", "text", "Format to print stdout in. Options include: [text,json]")
startCmd.Flags().String(trace, "", "Send trace events. Options include: [gcp]")
startCmd.Flags().Int(extraDisks, 0, "Number of extra disks created and attached to the minikube VM (currently only implemented for hyperkit, kvm2, qemu2, and vfkit drivers)")
startCmd.Flags().Int(extraDisks, 0, "Number of extra disks created and attached to the minikube VM (currently only implemented for hyperkit, kvm2, qemu2, vfkit, and krunkit drivers)")
startCmd.Flags().Duration(certExpiration, constants.DefaultCertExpiration, "Duration until minikube certificate expiration, defaults to three years (26280h).")
startCmd.Flags().String(binaryMirror, "", "Location to fetch kubectl, kubelet, & kubeadm binaries from.")
startCmd.Flags().Bool(disableOptimizations, false, "If set, disables optimizations that are set for local Kubernetes. Including decreasing CoreDNS replicas from 2 to 1. Defaults to false.")
Expand Down Expand Up @@ -474,6 +474,8 @@ func getNetwork(driverName string) string {
return validateQemuNetwork(n)
} else if driver.IsVFKit(driverName) {
return validateVfkitNetwork(n)
} else if driver.IsKrunkit(driverName) {
return validateKrunkitNetwork(n)
}
return n
}
Expand Down Expand Up @@ -532,6 +534,17 @@ func validateVfkitNetwork(n string) string {
return n
}

func validateKrunkitNetwork(n string) string {
if runtime.GOOS != "darwin" && runtime.GOARCH != "arm64" {
exit.Message(reason.Usage, "The krunkit driver is only supported on macOS arm64 machines")
}
if err := vmnet.ValidateHelper(); err != nil {
vmnetErr := err.(*vmnet.Error)
exit.Message(vmnetErr.Kind, "The krunkit driver requires vment-helper: {{.reason}}", out.V{"reason": err})
}
return n
}

// generateNewConfigFromFlags generate a config.ClusterConfig based on flags
func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, rtime string, drvName string) config.ClusterConfig {
var cc config.ClusterConfig
Expand Down Expand Up @@ -997,7 +1010,7 @@ func interpretWaitFlag(cmd cobra.Command) map[string]bool {
}

func checkExtraDiskOptions(cmd *cobra.Command, driverName string) {
supportedDrivers := []string{driver.HyperKit, driver.KVM2, driver.QEMU2, driver.VFKit}
supportedDrivers := []string{driver.HyperKit, driver.KVM2, driver.QEMU2, driver.VFKit, driver.Krunkit}

if cmd.Flags().Changed(extraDisks) {
supported := false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
################################################################################

HYPERV_DAEMONS_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
HYPERV_DAEMONS_SITE = https://www.kernel.org/pub/linux/kernel/v5.x
HYPERV_DAEMONS_SITE = https://www.kernel.org/pub/linux/kernel/v6.x
HYPERV_DAEMONS_SOURCE = linux-$(HYPERV_DAEMONS_VERSION).tar.xz

define HYPERV_DAEMONS_BUILD_CMDS
Expand Down
7 changes: 5 additions & 2 deletions deploy/iso/minikube-iso/board/minikube/aarch64/grub.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
set default="0"
set timeout="5"
set timeout="0"

menuentry "Buildroot" {
linux /boot/bzimage console=ttyAMA0 # kernel
# The console depends on the driver:
# qemu: console=ttyAMA0
# vfkit,krunkit: console=hvc0
linux /boot/bzimage console=ttyAMA0 console=hvc0
initrd /boot/initrd # rootfs
}
Loading
Loading