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

kindtool #2976

Closed
egandro opened this issue Oct 24, 2022 · 2 comments
Closed

kindtool #2976

egandro opened this issue Oct 24, 2022 · 2 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@egandro
Copy link

egandro commented Oct 24, 2022

What would you like to be added:

I am currently working on a kindtool program. The idea is to have a Kindfile at the root of a project. It can be used to simplyfy the creation, destrution, configuration of a cluster for development.

I will support the following options in the Kindfile:

cluster_name=kind
internal_registry=true
internal_registry_name=kind-registry
internal_registry_port=5001
external_registry=true
external_registry_config=.$HOME/.secret_registry/config.json
ingress=true
ingress_http_port=8000
ingress_https_port=8443
loadbalancer=true
worker_nodes=3
mountpoints=true
# default is $(Kindfile_dir)/.kind/data
mount_dir=
copy_examples=true
# default is $(Kindfile_dir)/.kind/config 
config_dir=
# installs the dashbard and creates a token file to `config_dir`/token
dashboard=true
# default is main IP of the host
# set back to 127.0.0.1 if you don't want this
api_server_address=

Workflow (like Vagrant)

$ kindtool init # creates a new Kindfile
$ kindtool up
$ kindtool halt
$ kindtool destroy
# kick the datafolder (needs to run as root as the docker might created 0:0 uid/gid files)
$ sudo kindtool delete-data 
# is kind running? where ist the config? what is the public http port? what features are present? etc
$ kindtool status
# returns the directory with the config files - can be used as export KUBECONFIG=$(kindfile status kubeconfig)
$ kindtool status kubeconfig 

Why is this needed:

It really is a pain in the behind to start fiddeling with config.yaml, manually creating moutpoints, adding ingress, adding ports, adding registries, etc.

I started implementing this in python (basically for learning) with jinja2 (like ansible) template files.

-> What do you guys think? Does this have the potential go become a plugin of kind itself? Should I switch to go and go templates?

Can we discuss the options of Kindfile?

Thanks!

@egandro egandro added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 24, 2022
@BenTheElder
Copy link
Member

Thanks for reaching out.

I would prefer not to add things like the dashboard built it, it's not a part of conformant kubernetes, and there are many other options including not using one at all.

As-is, we already support a configuration file and should look at if we want to add things like #1213.

Keeping kind focused makes it easier to build tools like this on top.

https://kind.sigs.k8s.io/docs/contributing/project-scope/

@egandro
Copy link
Author

egandro commented Oct 25, 2022

Thx! I keep my python project.

@egandro egandro closed this as completed Oct 25, 2022
@BenTheElder BenTheElder self-assigned this Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants