commodore icon indicating copy to clipboard operation
commodore copied to clipboard

Persist jsonnet-bundler Lock File

Open srueg opened this issue 4 years ago • 1 comments

Context

Currently the jsonnetfile.lock.json file is recreated on every catalog compile run and uses the most recent versions referenced in all jsonnetfile.json dependencies. This leads to changing cluster catalogs without changing any of the inputs (components, inventory and facts). While we can make sure to reference dependencies by immutable versions (i.e. git SHAs) we can't control sub-dependencies (e.g. of kube-prometheus). The lock file should be persisted in some way so repeatable catalog compiles are possible.

srueg avatar Oct 13 '20 11:10 srueg

One approach would be to compile each component as a separate Kapitan target with it's own Jsonnet dependencies. This would allow for each component to commit it's lock file in git and additionally for different components to use different versions of dependencies. This would require a mayor refactor of how the catalog is compiled. It would additionally improve compile times since different targets can be compiled in parallel.

Another approach would be to persist the lock file for the whole cluster in some way (e.g. lieutenant cluster object, tenant git repo, etc.).

srueg avatar Oct 13 '20 11:10 srueg