Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
kopf-archiver bot opened this issue Aug 18, 2020 · 1 comment · Fixed by #667
Closed
2 tasks done

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

kopf-archiver bot opened this issue Aug 18, 2020 · 1 comment · Fixed by #667
Labels
archive enhancement New feature or request question Further information is requested

Comments

@kopf-archiver
Copy link

kopf-archiver bot commented Aug 18, 2020

An issue by eshepelyuk at 2020-05-14 09:48:57+00:00
Original URL: zalando-incubator/kopf#367
 

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

Keywords

config, configuration

@kopf-archiver kopf-archiver bot closed this as completed Aug 18, 2020
@kopf-archiver kopf-archiver bot changed the title [archival placeholder] [question] How to provide custom configuration for an operator ? Aug 19, 2020
@kopf-archiver kopf-archiver bot added enhancement New feature or request question Further information is requested labels Aug 19, 2020
@kopf-archiver kopf-archiver bot reopened this Aug 19, 2020
@nolar nolar closed this as completed in #667 Feb 5, 2021
@nolar
Copy link
Owner

nolar commented Feb 25, 2021

Pre-released in kopf>=1.30.0rc1, docs: https://kopf.readthedocs.io/en/latest/memos/

Includes cross-handler data exchange (incl. cross-resource-&-operator-handlers) and arbitrary structs for embedded operators.

FYI, @eshepelyuk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archive enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant