kahkhang / kube-linode

:whale: Provision a Kubernetes/CoreOS cluster on Linode
MIT License
212 stars 31 forks source link

Passing in arguments to ./kube-linode? #55

Closed daniellacosse closed 6 years ago

daniellacosse commented 6 years ago

Hey - I'm working on a personal prototyping pipeline and I'd love to be able to call your scripts from within my own scripts. How would you prefer this be done? Would be happy to make a PR I just wanted to check with you first.

To be clear, it would be awesome to be able to do something like the following:

./kube-linode.sh --API_KEY=$(api_key) --WORKERS=2

etc.

kahkhang commented 6 years ago

Hi @daniellacosse, that sounds like a great suggestion, and thanks for volunteering the PR! If possible, could you follow the naming conventions for the current parameters? (i.e. DATACENTER_ID, MASTER_PLAN, WORKER_PLAN, DOMAIN, EMAIL, MASTER_ID, API_KEY, USERNAME, NO_OF_WORKERS) The script is just first loading the variables from settings.env into the environmental variables, and then checking one by one to see if a variable is set in the environment. Probably just dumping the shell script parameters into the environment might be the easiest and cleanest way :)

daniellacosse commented 6 years ago

👉 https://github.com/kahkhang/kube-linode/pull/62 🎊