🆕 v4.1.0 🚀
Highlights
📜 Configuration Enhancements
- 🐍 use viper for configuration management
- takes over the job of properly fetching and merging config options from
- CLI arguments/flags
- environment variables
- config file
- this also fixes some issues with using the config file (like cobra defaults overriding config file values)
- takes over the job of properly fetching and merging config options from
- ✔️ add JSON-Schema validation for the
Simple
config file schema - 🆕 config version
k3d.io/v1alpha2
(some naming changes)exposeAPI
->kubeAPI
options.k3d.noRollback
->options.k3d.disableRollback
options.k3d.prepDisableHostIPInjection
->options.k3d.disableHostIPInjection
💻 Docker over SSH
Features & Enhancements
- add root flag
--timestamps
to enable timestamped logs - improved multi-server cluster support (#467)
- log a warning, if one tries to create a cluster with only 2 nodes (no majority possible, no fault tolerance)
- revamped cluster start procedure: init-node, sorted servers, agents, helpers
- different log messages per role and start-place (that we wait for to consider a node to be ready)
- module:
NodeStartOpts
now accept aReadyLogMessage
andNodeState
now takes aStarted
timestamp string
Fixes
- do not ignore
--no-hostip
flag and don't inject hostip if--network=host
(#471, @konradmalik) - fix:
--no-lb
ignored - fix: print error cause when serverlb fails to start
Misc
- tests/e2e: add config override test
- tests/e2e: add multi server start-stop cycle test
- tests/e2e: improved logs with stage and test details.
- builds&tests: use Docker 20.10 and BuildKit everywhere
- 📝 docs: add https://github.com/AbsaOSS/k3d-action (GitHub Action) as a related project (#476, @kuritka)
Tested with
- E2E Tests ran with k3s versions
- v1.17.17-k3s1 (see Known Issues below)
- v1.18.15-k3s1 (see Known Issues below)
- v1.19.7-k3s1
- v1.20.2-k3s1
Known Issues
- automatic multi-server cluster restarts tend to fail with k3s versions v1.17.x & v1.18.x and probably earlier versions (using dqlite)
- Using Viper brings us lots of nice features, but also one problem:
- We had to switch StringArray flags to StringSlice flags, which
- allow to use multiple flag values comma-separated in a single flag, but also
- split flag values that contain a comma into separate parts (and we cannot handle issues that arise due to this)
- so if you rely on commas in your flag values (e.g. for
--env X=a,b,c
), please consider filing an issue or supporting spf13/viper#246 and spf13/viper#398 --env X=a,b,c
would be treated the same as--env X=a
,--env b
,--env c
- so if you rely on commas in your flag values (e.g. for
- We had to switch StringArray flags to StringSlice flags, which