Hi David,

great to see this moving forward! Here are a few comments from my side:

* I'm not sure if $[env:name] is the best syntax... I suppose you chose that over curly braces to not clash with potential other replacement mechanisms downstream. But $[] looks fairly similar to ${}, maybe something like %env:name%, %{env:name} or #{env:name} would make it visually clearer that it is not a ${} replacement.

* It looks like there is no way to escape for the case $[env:name] should be treated as literal at the moment - e.g. something like \$[env:name] should be possible IMHO

* I think it's good to use the 'secret' prefix ala $[secret:name] generically, but we should also (at least potentially) allow for secret stores other than Kubernetes (as described in [1]). I think changing the property name org.apache.felix.configadmin.plugin.interpolation.dir [2] to org.apache.felix.configadmin.plugin.interpolation.k8sSecretsDir (or similar) would be good to clearly indicate the expected directory structure as referenced by this property.

- Georg


[1] https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-files-from-a-pod

[2] https://github.com/apache/felix/blob/4c91624c6f1a47c5d6887446cb02fb906b110d40/configadmin-plugins/interpolation/src/main/java/org/apache/felix/configadmin/plugin/interpolation/Activator.java#L32



On 2019-07-26 13:12, David Bosschaert wrote:
Thanks for the suggestion, Bertrand!

I have renamed the plugin to 'interpolation'.
I have also implemented framework/system property based substitution as
suggested by JB Onofré
And I have added substitution support for environment variables, which can
be useful when you'd like to configure your runtime (e.g. containers)
12-factor style

The code is here:
https://svn.apache.org/repos/asf/felix/trunk/configadmin-plugins/interpolation
Documentation is best read on github:
https://github.com/apache/felix/blob/trunk/configadmin-plugins/interpolation/README.md

I'd like to do an initial 0.0.2 release early next week to make it easy for
everyone to try it out.

Any suggestions, let me know!

Cheers,

David


On Fri, 26 Jul 2019 at 10:06, Bertrand Delacretaz <bdelacre...@apache.org>
wrote:

Hi,

On Thu, Jul 25, 2019 at 4:32 PM David Bosschaert
<david.bosscha...@gmail.com> wrote:
> ...I was thinking of putting it at configadmin-plugins/substitution..

FWIW, "interpolation" is a common term for that as per
https://en.wikipedia.org/wiki/String_interpolation

-Bertrand

Reply via email to