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

New flag to allow option for passing a config file for addon configure command. #20255

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

panyam
Copy link

@panyam panyam commented Jan 13, 2025

Minor UI Change (Before and After described in the ticket) but tl;dr:

BEFORE

Currently when configuring addons with the command:

minikube addons configure <addon>

eg:

minikube addons configure registry-creds

The user is prompted to input the values one by one, eg:

Do you want to enable AWS Elastic Container Registry? [y/n]:

and so on. This makes it hard to store/load values in a scripted environemnt. Some times it easier to provide a config file containing so that the values can be read from this.

AFTER

Add a "-f" local flag to the addon configure command, eg:

minikube addons configure registry-creds -f ~/.minikube/configs/registry-creds-config.json
minikube addons configure ingress -f ~/.minikube/configs/ingres-config.json

etc

Fixes #20124

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 13, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: panyam
Once this PR has been reviewed and has the lgtm label, please assign medyagh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 13, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @panyam. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 13, 2025
@ComradeProgrammer
Copy link
Member

/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 Jan 13, 2025
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@panyam panyam changed the title Addon configuration now takes an optional config file to load from New flag to allow option for passing a config file for addon configure command. Jan 13, 2025
@minikube-pr-bot

This comment has been minimized.

// Processes registry-creds addon config from configFile if it exists otherwise resorts to default behavior
func processRegistryCredsConfig(profile string, configFileData map[string]any) {
// Default values
awsAccessID := "changeme"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there reason for "changeme" default value? seems unconventional, I would prefer either "" or something very explicit that has no chance of clodiing with users real values, like "MINIKUBE_DEFAULT_VALUE"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I like the MINIKUBE_DEFAULT_VALUE as a default. Updated it. PTAL

@k8s-ci-robot
Copy link
Contributor

Keywords which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages.

The list of commits with invalid commit messages:

  • d105076 Addon configuration now takes an optional config file to load from

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-sigs/prow repository. I understand the commands that are listed here.

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20255) |
+----------------+----------+---------------------+
| minikube start | 49.1s    | 47.9s               |
| enable ingress | 15.9s    | 14.8s               |
+----------------+----------+---------------------+

Times for minikube start: 50.5s 51.3s 47.5s 49.6s 46.8s
Times for minikube (PR 20255) start: 47.2s 48.0s 46.3s 49.8s 48.1s

Times for minikube ingress: 18.6s 15.4s 14.5s 16.0s 15.0s
Times for minikube (PR 20255) ingress: 14.6s 15.0s 15.0s 14.5s 14.9s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20255) |
+----------------+----------+---------------------+
| minikube start | 23.5s    | 22.7s               |
| enable ingress | 12.6s    | 12.2s               |
+----------------+----------+---------------------+

Times for minikube start: 21.5s 23.9s 23.4s 24.1s 24.6s
Times for minikube (PR 20255) start: 23.1s 20.3s 24.4s 21.1s 24.5s

Times for minikube ingress: 12.7s 12.3s 12.3s 12.8s 12.8s
Times for minikube (PR 20255) ingress: 12.3s 12.3s 11.3s 12.8s 12.3s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20255) |
+----------------+----------+---------------------+
| minikube start | 22.6s    | 22.6s               |
| enable ingress | 31.6s    | 22.8s               |
+----------------+----------+---------------------+

Times for minikube ingress: 39.8s 38.8s 27.9s 28.8s 22.9s
Times for minikube (PR 20255) ingress: 22.9s 22.9s 22.8s 22.9s 22.8s

Times for minikube start: 20.0s 23.6s 23.4s 23.1s 23.0s
Times for minikube (PR 20255) start: 21.3s 21.3s 23.5s 23.6s 23.5s

@minikube-pr-bot
Copy link

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

Environment Test Name Flake Rate
Docker_Cloud_Shell (4 failed) TestAddons/parallel/RegistryCreds(gopogh) Unknown
Docker_Linux (1 failed) TestAddons/parallel/RegistryCreds(gopogh) Unknown
none_Linux (1 failed) TestAddons/parallel/RegistryCreds(gopogh) Unknown
Docker_Linux_containerd_arm64 (2 failed) TestAddons/parallel/RegistryCreds(gopogh) Unknown
Docker_Linux_containerd_arm64 (2 failed) TestStartStop/group/old-k8s-version/serial/SecondStart(gopogh) 45.00% (chart)
Docker_Linux_crio (7 failed) TestAddons/parallel/RegistryCreds(gopogh) Unknown
Docker_Linux_crio (7 failed) TestFunctional/parallel/PersistentVolumeClaim(gopogh) 11.11% (chart)
Docker_Linux_crio (7 failed) TestFunctional/parallel/TunnelCmd/serial/WaitService/Setup(gopogh) 11.11% (chart)
Docker_Linux_crio (7 failed) TestFunctional/parallel/TunnelCmd/serial/AccessDirect(gopogh) 11.11% (chart)
Docker_Linux_crio (7 failed) TestFunctional/parallel/MySQL(gopogh) 16.67% (chart)
Docker_Linux_crio (7 failed) TestStartStop/group/default-k8s-diff-port/serial/Pause(gopogh) 22.22% (chart)
Docker_Linux_containerd (1 failed) TestAddons/parallel/RegistryCreds(gopogh) Unknown
Docker_Linux_crio_arm64 (3 failed) TestAddons/parallel/RegistryCreds(gopogh) Unknown
Docker_Linux_crio_arm64 (3 failed) TestStartStop/group/no-preload/serial/Pause(gopogh) 5.00% (chart)
Docker_Linux_docker_arm64 (1 failed) TestAddons/Setup(gopogh) 0.00% (chart)
KVM_Linux_containerd (3 failed) TestAddons/parallel/RegistryCreds(gopogh) Unknown

Besides the following environments also have failed tests:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Provide an option for passing a config file for addon configure command.
6 participants