kubespray / kubespray-cli

Easy to use command line tool for kubernetes deployment with kubespray
GNU General Public License v3.0
252 stars 62 forks source link

Cloning GIT repo means always getting the bleeding edge of HEAD #77

Open srjturner opened 7 years ago

srjturner commented 7 years ago

I had a working process using Kargo / Kargo CLI that has recently broken on "wait for the apiserver to be running". This led me to think about how the CLI is running Kargo itself, and whether that was actually stable. Looking at the code in common.py I see that this is using a Git clone to download Kargo, and of course this means the CLI will always end up using the very latest commits to the master branch of that repo, rather than a specific, known release.

I realise that I can use --noclone and use scripting to first fetch a specific release myself, but the default behaviour feels very obviously brittle to me. I think it should be possible to specify a Kargo release in kargo.yml (via a "kargo_git_tag") and then clone_kargo_git_repo in common.py might do something like git clone -b 'v2.0.0' --single-branch --depth 1 https://github.com/kubespray/kargo.git