openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Re: Simplifying configuring OpenWhisk Components (#3984)
Date Thu, 23 Aug 2018 08:28:19 GMT
> Is it possible to layer configurations with this? For example: If I create
a `database.conf` and a `controller.conf`, is there a way to mount these in
a way that they are both read and merged by the specific component?

This should be possible as of now also. If file mount option is used [1]
then you need to

1. Mount configMap directory  `/controller/config`
2. Have one `application.conf` in that directory which has includes for
`database.conf` and `controller.conf`

Then with changes done for #3059 these files would be included in classpath
and typesafe config logic to read all "application.conf" would get them
included.

Only issue is order is non deterministic so config override would not work.
That can be enabled by setting system property
-Dconfig.file=/controller/config/application.conf
(or env CONFIG_config_file). This would ensure that any later includes
would supersede previous includes


Chetan Mehrotra
[1]
https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#populate-a-volume-with-data-stored-in-a-configmap

On Thu, Aug 23, 2018 at 1:32 PM Markus Thömmes <markusthoemmes@apache.org>
wrote:

> Hi Chetan,
>
> good idea!
>
> A bit of background on why it is how it is: When I implemented the approach
> we're having today, the basic thought was to be able to detect on a quite
> granular level what changes are needed to which components, even when they
> share values. For example: In the Kubernetes case, most of the env
> variables are read out of a ConfigMap. Updating such a ConfigMap can
> trigger a restart of the specific pods to reload the config.
>
> This is possible with this approach as well, in fact for something like
> Kubernetes it's even easier (I believe you can mount the ConfigMap directly
> without needing to pass it via env). What I'd like to make sure though:
>
> Is it possible to layer configurations with this? For example: If I create
> a `database.conf` and a `controller.conf`, is there a way to mount these in
> a way that they are both read and merged by the specific component?
>
> Cheers,
> Markus
>
> Am Do., 23. Aug. 2018 um 08:36 Uhr schrieb Chetan Mehrotra <
> chetan.mehrotra@gmail.com>:
>
> > Hi Team,
> >
> > Currently we rely on env variables to configure OpenWhisk component like
> > Controller and Invoker. For example setting
> > whisk.loadbalancer.invoker-busy-threshold would need env name like
> > "CONFIG_whisk_loadbalancer_invokerBusyThreshold".
> >
> > This mapping is at times tricky to get right and bit error prone
> (specially
> > when setting list props). It would be better if we can directly pass in
> the
> > config in typesafe config format [1]. This would simplify managing the
> > config in version control and also reusing the default config directly.
> >
> > For this purpose I have created a PR #3984. For now this PR only enable
> use
> > to this proposed approach. If it looks good we can modify the default
> > ansible setup to use the new approach in a subsequent PR.
> >
> > Feedback welcome!
> >
> > Chetan Mehrotra
> > [1] https://github.com/lightbend/config/blob/master/HOCON.md
> > [2] https://github.com/apache/incubator-openwhisk/pull/3984
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message