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

auto-pause addon: configure intervals using --auto-pause-interval addon flag and addon configure #17070

Merged
merged 4 commits into from
Sep 6, 2023

Conversation

wzslr321
Copy link
Contributor

@wzslr321 wzslr321 commented Aug 16, 2023

fixes #10595

Make AutoPause interval configurable by both persistent config with addons and minikube start flag. Defaults to 1 minute.

Configurable addon

➜  minikube git:(auto-pause-time-config) ✗ ./out/minikube addons configure auto-pause-interval
-- Enter interval time of auto-pause-interval (in minutes): 3
✅  auto-pause-interval was successfully configured
➜  minikube git:(auto-pause-time-config) ✗ cat ~/.minikube/profiles/minikube/config.json | grep AutoPauseInterval
    "AutoPauseInterval": 180000000000

Configurable flag on minikube start

➜  minikube git:(auto-pause-time-config) ✗ ./out/minikube start --auto-pause-interval=2m0s
😄  minikube v1.31.1 on Darwin 13.0.1 (arm64)
🆕  Kubernetes 1.27.4 is now available. If you would like to upgrade, specify: --kubernetes-version=v1.27.4
✨  Using the docker driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
🔄  Restarting existing docker container for "minikube" ...
🐳  Preparing Kubernetes v1.27.3 on Docker 24.0.4 ...
🔗  Configuring bridge CNI (Container Networking Interface) ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass

❗  /usr/local/bin/kubectl is version 1.25.2, which may have incompatibilities with Kubernetes 1.27.3.
    ▪ Want kubectl v1.27.3? Try 'minikube kubectl -- get pods -A'
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 16, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot
Copy link
Contributor

Welcome @wzslr321!

It looks like this is your first PR to kubernetes/minikube 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/minikube has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @wzslr321. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 16, 2023
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@medyagh
Copy link
Member

medyagh commented Aug 30, 2023

@wzslr321 thanks for this PR can u plz fix the lint?

@medyagh
Copy link
Member

medyagh commented Aug 30, 2023

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 30, 2023
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@wzslr321
Copy link
Contributor Author

@wzslr321 thanks for this PR can u plz fix the lint?

Yes, sorry I did not notice it before. I fixed the lint by running make generate-docs and reordering the imports in cmd/auto-pause/auto-pause.go. make lint passes now, at least locally

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, wzslr321

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 5, 2023
@medyagh
Copy link
Member

medyagh commented Sep 5, 2023

/retest-this-please

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 17070) |
+----------------+----------+---------------------+
| minikube start | 52.0s    | 52.9s               |
| enable ingress | 27.8s    | 27.3s               |
+----------------+----------+---------------------+

Times for minikube start: 52.6s 51.6s 52.2s 49.5s 53.9s
Times for minikube (PR 17070) start: 55.2s 52.0s 54.4s 50.4s 52.8s

Times for minikube ingress: 25.2s 28.7s 27.7s 28.1s 29.1s
Times for minikube (PR 17070) ingress: 28.2s 27.1s 28.1s 27.1s 25.7s

docker driver with docker runtime

+-------------------+----------+---------------------+
|      COMMAND      | MINIKUBE | MINIKUBE (PR 17070) |
+-------------------+----------+---------------------+
| minikube start    | 23.8s    | 23.9s               |
| ⚠️  enable ingress | 21.1s    | 33.0s ⚠️             |
+-------------------+----------+---------------------+

Times for minikube start: 24.5s 24.5s 21.6s 22.6s 25.7s
Times for minikube (PR 17070) start: 25.0s 21.9s 25.1s 22.2s 25.2s

Times for minikube ingress: 20.8s 20.8s 20.8s 21.8s 20.9s
Times for minikube (PR 17070) ingress: 81.3s 20.9s 21.8s 21.3s 19.8s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 17070) |
+----------------+----------+---------------------+
| minikube start | 21.8s    | 22.7s               |
| enable ingress | 40.5s    | 31.5s               |
+----------------+----------+---------------------+

Times for minikube start: 23.3s 21.2s 23.4s 21.0s 20.4s
Times for minikube (PR 17070) start: 20.6s 23.1s 23.0s 24.0s 22.9s

Times for minikube ingress: 78.3s 31.4s 31.4s 30.3s 31.3s
Times for minikube (PR 17070) ingress: 31.3s 31.3s 31.3s 31.3s 32.3s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_Linux_containerd TestAddons/parallel/HelmTiller (gopogh) 0.00 (chart)
Docker_Linux_containerd TestAddons/serial/GCPAuth/Namespaces (gopogh) 0.00 (chart)
Docker_Linux_crio TestFunctional/parallel/ImageCommands/ImageListShort (gopogh) 0.62 (chart)
Hyperkit_macOS TestStoppedBinaryUpgrade/Upgrade (gopogh) 9.68 (chart)

To see the flake rates of all tests by environment, click here.

@medyagh
Copy link
Member

medyagh commented Sep 6, 2023

thank you for your contribution @wzslr321 look forward to see more contributions from you

@medyagh medyagh merged commit ccbd6cf into kubernetes:master Sep 6, 2023
16 of 19 checks passed
@medyagh medyagh changed the title configure auto-pause-interval addon auto-pause addon: configure intervals using --auto-pause-interval addon flag and addon configure Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auto-pause: make time to pause configurable
5 participants