Add dc.Spec.Config validation for properties#224
Add dc.Spec.Config validation for properties#224burmanm wants to merge 2 commits intok8ssandra:masterfrom
Conversation
94b5591 to
ffe1cc2
Compare
|
@jsanda @miles This work should support removing the config-builder also at some point. All we need is templating something else instead of only maps (or we could push default values here and other stuff the config-builder does). Maybe that could help with the non-root issue also? For future work, we could also of course help users by cleaning the config file from values that are not allowed and simply make events when those occur. At the same time, we could add notifications that the values are deprecated also and user should migrate to something else. |
|
I'm just getting around to looking at this properly, apologies it has taken me so long. This is, in general, a really good idea. Having a structured way to address questions like the following will be really helpful:
I'd be cautious about creating resources which don't fully satisfy the user's requested spec. Where we can raise errors via the webhook I think this offers fast failure and should be preferred. Sometimes, having an unexpected configuration can cause quite serious issues (e.g. if audit logging was not enabled, that could escalate to being a security issue). I was originally envisaging doing something similar to this using Java's reflection capabilities, but I think the choice of Python is also totally fine. My main questions would be:
|
…n defined version
What this PR does:
Adds scripts to generate configuration from Cassandra's source code for all the possible values. Also adds validation to webhook and the reconcile function to check that values that are not available in that version are also not passed to the config generator.
To run the generator:
Supports OSS Cassandra only at this point, for versions 4.0., 3.11. and the trunk.
Which issue(s) this PR fixes:
Fixes #
Checklist