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
321 stars 49 forks source link

Print configuration diff to the user before "cluster apply" operation #1143

Open invidian opened 4 years ago

invidian commented 4 years ago

Distilled from https://github.com/kinvolk/lokomotive/issues/142#issuecomment-718730596, we could take user configuration while lokoctl cluster apply runs and we could save it to the cluster as Secret object.

Then, on subsequent lokoctl cluster apply runs, we would pull the content of the secret and print user a diff in the configuration, so they can confirm it. This would include both cluster and components configuration. We could also store used lokoctl version there and/or Lokomotive version (when #312 gets implemented).

Some questions to answer before we implement it:

johananl commented 4 years ago

Not sure it's 100% applicable but putting it here anyway: https://github.com/google/go-cmp could become useful for calculating diffs and formatting them.

johananl commented 4 years ago

Actually -

It is intended to only be used in tests

So :shrug: