kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.24k stars 4.87k forks source link

Add "-o json" option for "minikube addon images" #19364

Closed thomasjm closed 1 month ago

thomasjm commented 1 month ago

I wanted to be able to programmatically consume the output of minikube addon images ADDON_NAME.

The normal behavior is unchanged:

$ minikube addons images gvisor
    ▪ gvisor has the following images:
|-------------|----------------------------------------------------------------------------------------------------------|------------------|
| IMAGE NAME  |                                              DEFAULT IMAGE                                               | DEFAULT REGISTRY |
|-------------|----------------------------------------------------------------------------------------------------------|------------------|
| GvisorAddon | k8s-minikube/gvisor-addon:v0.0.1@sha256:d29adbddc7a44dab4c675c0eaea398907fe1f33f5f723274b0d40195b3076cae | gcr.io           |
|-------------|----------------------------------------------------------------------------------------------------------|------------------|

But now you can do -o json:

$ minikube addons images gvisor -o json
["gcr.io/k8s-minikube/gvisor-addon:v0.0.1@sha256:d29adbddc7a44dab4c675c0eaea398907fe1f33f5f723274b0d40195b3076cae"]

Also fixed the grammar of the existing message from "has following images" to "has the following images."

k8s-ci-robot commented 1 month ago

Hi @thomasjm. 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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
minikube-bot commented 1 month ago

Can one of the admins verify this patch?

medyagh commented 1 month ago

/ok-to-test

minikube-pr-bot commented 1 month ago

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19364) |
+----------------+----------+---------------------+
| minikube start | 48.4s    | 50.6s               |
| enable ingress | 24.2s    | 25.3s               |
+----------------+----------+---------------------+
Times for minikube start: 48.5s 48.1s 46.7s 50.3s 48.6s Times for minikube (PR 19364) start: 49.2s 55.2s 47.2s 50.2s 51.1s Times for minikube ingress: 25.4s 22.9s 23.9s 24.9s 23.9s Times for minikube (PR 19364) ingress: 23.9s 27.9s 23.9s 24.0s 26.9s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19364) |
+----------------+----------+---------------------+
| minikube start | 22.7s    | 22.5s               |
| enable ingress | 21.4s    | 21.8s               |
+----------------+----------+---------------------+
Times for minikube ingress: 20.8s 21.3s 21.8s 20.3s 22.8s Times for minikube (PR 19364) ingress: 21.8s 21.3s 22.8s 22.3s 20.8s Times for minikube start: 23.9s 24.9s 21.7s 21.7s 21.3s Times for minikube (PR 19364) start: 20.8s 24.1s 21.8s 24.7s 21.1s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19364) |
+----------------+----------+---------------------+
| minikube start | 21.4s    | 22.7s               |
| enable ingress | 42.2s    | 43.9s               |
+----------------+----------+---------------------+
Times for minikube start: 23.2s 20.5s 20.9s 23.1s 19.5s Times for minikube (PR 19364) start: 23.2s 23.5s 22.9s 20.7s 23.1s Times for minikube ingress: 33.3s 47.8s 32.2s 49.3s 48.3s Times for minikube (PR 19364) ingress: 48.3s 38.3s 46.8s 38.3s 47.8s
minikube-pr-bot commented 1 month ago

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19364) |
+----------------+----------+---------------------+
| minikube start | 51.9s    | 49.8s               |
| enable ingress | 25.0s    | 25.8s               |
+----------------+----------+---------------------+
Times for minikube start: 53.7s 53.4s 50.8s 50.1s 51.8s Times for minikube (PR 19364) start: 50.0s 50.1s 50.3s 50.4s 48.2s Times for minikube (PR 19364) ingress: 23.9s 26.0s 27.9s 27.0s 23.9s Times for minikube ingress: 24.9s 24.0s 24.4s 24.5s 27.0s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19364) |
+----------------+----------+---------------------+
| minikube start | 22.8s    | 23.0s               |
| enable ingress | 21.7s    | 21.8s               |
+----------------+----------+---------------------+
Times for minikube start: 21.9s 24.9s 21.0s 23.8s 22.4s Times for minikube (PR 19364) start: 24.3s 24.0s 25.2s 20.6s 21.0s Times for minikube ingress: 21.8s 21.3s 21.8s 21.7s 21.8s Times for minikube (PR 19364) ingress: 21.8s 21.7s 22.3s 21.3s 21.8s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19364) |
+----------------+----------+---------------------+
| minikube start | 22.0s    | 22.6s               |
| enable ingress | 47.9s    | 47.8s               |
+----------------+----------+---------------------+
Times for minikube ingress: 47.3s 48.2s 47.3s 48.3s 48.2s Times for minikube (PR 19364) ingress: 47.3s 47.2s 48.2s 49.3s 46.8s Times for minikube (PR 19364) start: 20.2s 22.5s 23.5s 23.2s 23.7s Times for minikube start: 22.9s 22.3s 20.6s 22.9s 21.5s
minikube-pr-bot commented 1 month ago

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate
Docker_Linux_containerd_arm64 (2 failed) TestStartStop/group/old-k8s-version/serial/SecondStart(gopogh) 47.53% (chart)

Besides the following environments also have failed tests:

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

minikube-pr-bot commented 1 month ago

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate
KVM_Linux (1 failed) TestMultiControlPlane/serial/RestartSecondaryNode(gopogh) 0.62% (chart)

Besides the following environments also have failed tests:

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

medyagh commented 1 month ago

/lgtm

k8s-ci-robot commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

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

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: - ~~[OWNERS](https://github.com/kubernetes/minikube/blob/master/OWNERS)~~ [medyagh] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
medyagh commented 1 month ago

thanks for this contribution, look forward to see more contributions