diff --git a/CHANGELOG.md b/CHANGELOG.md index 2065ef5..70a7dcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Component name ([#2]) - Disable Kapitan plugin ([#4]) +- Non-default StorageClasses have their "is-default-class" annotation removed ([#7]) ### Fixed @@ -25,3 +26,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#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 +[#7]: https://github.com/projectsyn/component-storageclass/pull/7 diff --git a/lib/storageclass.libsonnet b/lib/storageclass.libsonnet index 036903f..6fe5077 100644 --- a/lib/storageclass.libsonnet +++ b/lib/storageclass.libsonnet @@ -20,7 +20,7 @@ local params = inv.parameters.storageclass; local storageClass(name) = kube._Object('storage.k8s.io/v1', 'StorageClass', name) { metadata+: { annotations+: { - [if params.defaultClass == name then 'storageclass.kubernetes.io/is-default-class']: 'true', + 'storageclass.kubernetes.io/is-default-class': if params.defaultClass == name then 'true' else null, }, }, } + params.defaults;