kinvolk / lokomotive

🪦 DISCONTINUED Further Lokomotive development has been discontinued. Lokomotive is a 100% open-source, easy to use and secure Kubernetes distribution from the volks at Kinvolk
https://kinvolk.io/lokomotive-kubernetes/
Apache License 2.0
320 stars 49 forks source link

Add default value of `assets_dir` #709

Open surajssd opened 4 years ago

surajssd commented 4 years ago

Make asset_dir an optional variable by adding default value as assets.

This will be one less variable user has to provide when starting out.

iaguis commented 4 years ago

This sounds OK to me. Tagging @johananl for UX opinions :)

johananl commented 4 years ago

Yes! :clap: I think we can default to .assets (hidden) and ensure we bail out if lokoctl is executed in a directory which doesn't contain a *.lokocfg file to avoid accidentally overwriting an unrelated directory named .assets. We could also decide to be extra safe and set the default to .lokoctl_assets.

Another note - if we make asset_dir transparent to the user, we should consider removing the "you can delete the assets dir now" message.

invidian commented 4 years ago

Another note - if we make asset_dir transparent to the user, we should consider removing the "you can delete the assets dir now" message.

But this will clutter the disk space, as asset dir is not small :/

Yes! clap I think we can default to .assets (hidden) and ensure we bail out if lokoctl is executed in a directory which doesn't contain a *.lokocfg file to avoid accidentally overwriting an unrelated directory named .assets. We could also decide to be extra safe and set the default to .lokoctl_assets.

.lokoctl_assets as default value seems reasonable to me.

However, assuming that *.lokocfg files are versioned using Git, it would be good to put asset directory outside the current directory. We could use for example $XDG_DATA_HOME/lokoctl/<cluster name> (so by default $HOME/.local/share/lokoctl/<cluster name>). But maybe that's too complicated for now.