diff --git a/CHANGELOG.md b/CHANGELOG.md index eb4e6fa..2065ef5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,9 +17,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Keep the empty manifest directory ([#3]) +- Deep-merging of StorageClass overrides ([#6]) [Unreleased]: https://github.com/projectsyn/component-storageclass/compare/76db758a57b9dc33b95abf0a1bd7a21ce1ac185a...HEAD [#1]: https://github.com/projectsyn/component-storageclass/pull/1 [#2]: https://github.com/projectsyn/component-storageclass/pull/2 [#3]: https://github.com/projectsyn/component-storageclass/pull/3 [#4]: https://github.com/projectsyn/component-storageclass/pull/4 +[#6]: https://github.com/projectsyn/component-storageclass/pull/6 diff --git a/component/main.jsonnet b/component/main.jsonnet index 3d85398..241dd9a 100644 --- a/component/main.jsonnet +++ b/component/main.jsonnet @@ -1,3 +1,4 @@ +local com = import 'lib/commodore.libjsonnet'; local kap = import 'lib/kapitan.libjsonnet'; local kube = import 'lib/kube.libjsonnet'; local inv = kap.inventory(); @@ -7,7 +8,7 @@ local params = inv.parameters.storageclass; { [name]: - sc.storageClass(name) + params.classes[name] + sc.storageClass(name) + com.makeMergeable(params.classes[name]) for name in std.objectFields(params.classes) } + { [if std.length(params.classes) == 0 then '.gitkeep']: {},