kopf icon indicating copy to clipboard operation
kopf copied to clipboard

[question] How to provide custom configuration for an operator ?

Open eshepelyuk opened this issue 4 years ago • 0 comments

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 operator Deployment and read the file from ConfigMap inside on.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.

  1. Is there recomended way of extending configuraiton ?
  2. 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

eshepelyuk avatar May 14 '20 09:05 eshepelyuk