Skip to content
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

ci: make minikube.sh work on macOS M1 with the qemu2 driver #4368

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

zjx20
Copy link

@zjx20 zjx20 commented Jan 11, 2024

Describe what this PR does

This PR makes scripts/minikube.sh work on macOS M1 with the qemu2 driver.

Some modifications have been made to handle the compatibility of bash scripts. For example, sed -i without a value only works for GNU sed, but not for macOS's sed. The RESOLV_CONF variable has been made configurable because it needs to be overridden as /etc/resolv.conf when using the qemu2 driver. In addition, minikube also supports adding extra disks for the qemu2 driver.

Related issues

No.

Future concerns

List items that are not part of the PR and do not impact it's
functionality, but are work items that can be taken up subsequently.

Checklist:

  • Commit Message Formatting: Commit titles and messages follow
    guidelines in the developer
    guide
    .
  • Reviewed the developer guide on Submitting a Pull
    Request
  • Pending release
    notes

    updated with breaking and/or notable changes for the next major release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

Show available bot commands

These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:

  • /retest ci/centos/<job-name>: retest the <job-name> after unrelated
    failure (please report the failure too!)

@riya-singhal31
Copy link
Contributor

riya-singhal31 commented Jan 11, 2024

Please update commit message type from scripts to ci and reduce the length of body's line to max 80 chars by splitting into a new line, to make the checks passed.

@riya-singhal31
Copy link
Contributor

Have you tested this out?

Some modifications have been made to handle the compatibility of bash scripts.
For example, `sed -i` without a value only works for GNU sed, but not for
macOS's sed.
The RESOLV_CONF variable has been made configurable because it needs to be
overridden as /etc/resolv.conf when using the qemu2 driver.
In addition, minikube also supports adding extra disks for the qemu2 driver.

Signed-off-by: zjx20 <[email protected]>
@zjx20
Copy link
Author

zjx20 commented Jan 11, 2024

Have you tested this out?

It works for my MBP M1 with macOS Monterey and minikube v1.32.0, but I haven't tested it on linux systems.

@zjx20 zjx20 changed the title scripts: make minikube.sh work on macOS M1 with the qemu2 driver ci: make minikube.sh work on macOS M1 with the qemu2 driver Jan 11, 2024
@mergify mergify bot added the component/testing Additional test cases or CI work label Jan 11, 2024
@nixpanic
Copy link
Member

/test ci/centos/k8s-e2e-external-storage/1.29

@nixpanic
Copy link
Member

/test ci/centos/k8s-e2e-external-storage/1.29

Deploying in the CI still works 👍

I can not test this on a Mac, ideally someone else tries it out before this gets merged.

@zjx20
Copy link
Author

zjx20 commented Jan 17, 2024

Thank you @nixpanic. I hope someone will kindly try this branch on macOS M1 and give some feedback.

Here are the instructions:

export KUBE_VERSION=v1.28.3    # it's the latest version supported by minikube v1.32.0.
export MINIKUBE_ARCH=arm64
export VM_DRIVER=qemu2         # hyperkit is unavailable for arm64, so qemu2 is the only option for macOS M1
export CNI=auto
export RESOLV_CONF=/etc/resolv.conf
export CPUS=4                  # "nproc" is unavailable on macOS, so explicitly set a number
export MEMORY=4096
export DISK_SIZE=20

./scripts/minikube.sh up
./scripts/minikube.sh deploy-rook

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 16, 2024
@nixpanic nixpanic added keepalive This label can be used to disable stale bot activiity in the repo and removed stale labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/testing Additional test cases or CI work keepalive This label can be used to disable stale bot activiity in the repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants