Operator config by the admin

14 views
Skip to first unread message

Shoubhik Bose

unread,
Oct 20, 2020, 12:22:34 PM10/20/20
to Operator Framework
Greetings folks,

I would like to have the admin enable/disable certain operator functionalities using environment variables set by the admin who installs the operator by creating a Subscription.

Setting the Subscription's spec.config.env works great. 

I wonder if the community has an opinion on that compared to having the operator code read config from a well-known configmap.

Thanks,
Shoubhik

Josiah Ritchie

unread,
Oct 20, 2020, 3:30:25 PM10/20/20
to Shoubhik Bose, Operator Framework
Another pattern I've seen used a few times is the having a separate CR which works much like a ConfigMap, but includes custom validation. 

--
You received this message because you are subscribed to the Google Groups "Operator Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to operator-framew...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/operator-framework/CANSWONnDc0jBWe4u%2BaxSrTbJtgUeigtZaNNEtF5EdX61t05sSw%40mail.gmail.com.

Ric Featherstone

unread,
Nov 16, 2020, 4:57:28 AM11/16/20
to Operator Framework
I may have missed something but having a way to provide specific configuration when installing an operator appears to be missing.

I've been writing operators that configure external systems such as Vault and these have different target URLs is different environments.

It would be great to have this supported by OLM such that you could define configuration and possibly provide defaults that could be overridden.

Daniel Messer

unread,
Nov 16, 2020, 5:50:46 AM11/16/20
to Ric Featherstone, Operator Framework
This is possible, see: https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/design/subscription-config.md

It's not a first class experience in our UI or official docs yet, because an Operator should always come up and be configured after the fact. E.g. you can think about Operators taking a user-specific configuration either on a per-API/request basis or pick it up from a ConfigMap or custom Config object on a per-namespace basis.



--
Daniel Messer

Product Manager Operator Framework & Quay

Red Hat OpenShift

Ric Featherstone

unread,
Nov 16, 2020, 6:02:03 AM11/16/20
to Operator Framework
That's awesome, I hadn't picked up on that. Thank you
Reply all
Reply to author
Forward
0 new messages