kopf
kopf copied to clipboard
[question] How to provide custom configuration for an operator ?
Question
Somehow related to discussion from #280
I wan't to pass some configuration to an operator with quite complex nested structure, eg. JSON, YAML etc. Currently I haven't found any standard way of providing and injecting such config into operator handler.
The possible options I could use to achieve my goal is:
- pass values as ENV vars, but this is not applicable for complex data structures
- inject
ConfigMap
into operatorDeployment
and read the file fromConfigMap
insideon.startup
handler - embed kopf and pass through parameters to kopf, retrieving from from CLI
But all of those are requiring some custom development and boilerplate code for every new operator created with kopf
.
- Is there recomended way of extending configuraiton ?
- Is there plan to provide some generic component for such uses cases ?
Checklist
- [x] I have read the documentation and searched there for the problem
- [x] I have searched in the GitHub Issues for similar questions
Keywords
config, configuration