Hi David,
I guess it would be an idea to make these configurable, however I'm not
yet
fully convinced that it would really add much value. Is there a
specific
thing you can't do or do you just want to make it look different?
Let's not make it configurable, but I think it is worthwhile to not just
use "a syntax" but rather the best syntax for good reasons :) So I'm
fine with $[] (it's good that it is not just ${} which might collide
with other mechanisms), but I think e.g. #{} would better because
visually, $[] and ${} look very similar, but ${} are easily #{}
distinguished. Whatever we chose now, we will never be able to change
again....
Right yes, it should be possible to escape. Best thing would be to file
a
bug for this. There is now a JIRA component for the plugin:
https://issues.apache.org/jira/projects/FELIX/versions/12345963
I created https://issues.apache.org/jira/browse/FELIX-6164 for this
The $[secret:name] lookup doesn't actually do anything that is k8s
specific
in itself. K8s just puts the secrets in plain files: the name of the
file
is the key and the entire content of the file is the secret value. That
pattern could also be used in a non-k8s context. Maybe we can rename
the
property name to
'org.apache.felix.configadmin.plugin.interpolation.secretdir' or
something
like that?
So even though the secrets directory doesn't contain any k8s-specifc
tokens, its format is still k8s-specific (I'm not aware of any other
configuration mechanism that uses a directory with flat files per
property... there are property files and some languages use yaml files,
but this mechanisms I have not seen elsewhere). So I think
org.apache.felix.configadmin.plugin.interpolation.k8sSecretsDir is the
correct way of specifying this (maybe we get
org.apache.felix.configadmin.plugin.interpolation.secretsPropertyFile
and others some time in the future)
And there is one more question: Do we really want to filter all property
sets for all PIDs? I suppose in reality often only < 5% of the
configuration data would actually contain placeholders. Would it be
worthwhile to introduce a property
org.apache.felix.configadmin.plugin.interpolation.pidRegex to limit the
PIDs that are transformed?
-Georg