-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Non-interactive minikube addons configure? #8283
Comments
I think this is a great idea. While there is no technical reason an addon could not be configured via |
@krezovic did you make any progress implementing this? I'm looking into doing something similar and fetched/test-built the minikube source last night to begin hacking on the code. Initial research/thoughtsSome of my initial thoughts/take-aways after looking at the addons/config codepaths:
A Naive DesignLooking at this problem and the plethora of minikube addons and possible usecases for configuration, choosing a one-size fits all approach that can't be implemented incrementally will probably lead to bike-shedding and failure. Instead of requiring all addons to be able to be immediately be configured via the command line or config file, I propose the following high-level changes:
After these changes the workflow would be as follows:
This isn't my favorite set of changes, but it seems like a small, non-detrimental set of changes that accomplishes the goal without hamstring future improvements. @tstromberg do you have any thoughts about this implementation or ideas about appropriate placement for the configuration? I wouldn't want my pull request to utterly clobber I could also see it being worthwhile to create addon-specific files within the profile, but I'd like to hear other's thoughts. |
I have no issue adding information to |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
I know this is old, but in response to "metallb" add-on specifically, I poked around this after finding my configs getting reset sometimes, and not being able to trick it by echoing newlines, I wanted to share what I learned about customizing the start/end IPs incase it helps someone. I found they are stored as part of the KubernetesConfig type in minikube, so it's stored in your minikube profile directory (e.g.
This approach will work for automating start-end IP ranges, which should support most minikube's users needs. If one wants or needs to use CIDR format for addresses or alternative metallb configurations, they will be overwritten unless you customize the addon files and build your minikube. |
Same approach as r4j4h but with minikube ip range. In that way, there is no extra network route to set locally. In my case it permit to access to the dashboard with a local ip (and not through minikube proxy).
|
I went on another route and created a new revision of the MetalLB ConfigMap after the addon was enabled: Hope it's useful for anyone |
Modifying
This simulates inputting the data interactively. |
I also have a similar use case. We automate the whole configuration of the local environment in our company.... and configuring some stuff on minikube is important to achieve this. We, currently, use Would be great to see a way to programmatically configure any |
I have a similar issue, but with a different add-on:
|
FWIW it's possible to automate the configuration for the In other words, cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
name: registry-creds-gcr
namespace: kube-system
labels:
app: registry-creds
kubernetes.io/minikube-addons: registry-creds
cloud: gcr
data:
application_default_credentials.json: $(openssl base64 <<< "$APPLICATION_DEFAULT_CREDENTIALS_JSON" | tr -d '\n')
gcrurl: $(echo -n 'https://gcr.io' | openssl base64)
type: Opaque
EOF And then create the remaining 3 secrets with bogus data cat <<EOF | kubectl apply -f -
---
apiVersion: v1
kind: Secret
metadata:
name: registry-creds-acr
namespace: kube-system
labels:
app: registry-creds
cloud: acr
kubernetes.io/minikube-addons: registry-creds
data:
ACR_CLIENT_ID: Y2hhbmdlbWU=
ACR_PASSWORD: Y2hhbmdlbWU=
ACR_URL: Y2hhbmdlbWU=
type: Opaque
---
apiVersion: v1
kind: Secret
metadata:
name: registry-creds-dpr
namespace: kube-system
labels:
app: registry-creds
cloud: dpr
kubernetes.io/minikube-addons: registry-creds
data:
DOCKER_PRIVATE_REGISTRY_PASSWORD: Y2hhbmdlbWU=
DOCKER_PRIVATE_REGISTRY_SERVER: Y2hhbmdlbWU=
DOCKER_PRIVATE_REGISTRY_USER: Y2hhbmdlbWU=
type: Opaque
---
apiVersion: v1
kind: Secret
metadata:
name: registry-creds-ecr
namespace: kube-system
labels:
app: registry-creds
cloud: ecr
kubernetes.io/minikube-addons: registry-creds
data:
AWS_ACCESS_KEY_ID: Y2hhbmdlbWU=
AWS_SECRET_ACCESS_KEY: Y2hhbmdlbWU=
AWS_SESSION_TOKEN: ""
aws-account: Y2hhbmdlbWU=
aws-assume-role: Y2hhbmdlbWU=
aws-region: Y2hhbmdlbWU=
type: Opaque
EOF After creating the secret resources, you can |
I'm trying to fully script a minikube start command so I can share it between developers.
I want to use metallb addon introduced recently, which requires LoadBalancer Start and End IPs (I can construct it with output from minikube ip) to be configured via minikube addons configure metallb.
Can this be set non-interactively? By default, it always spawns the input, and you have to input the addresses yourselves.
The text was updated successfully, but these errors were encountered: