Open matter-it-does opened 1 year ago
/cc @Sgitario (kubernetes), @geoand (kubernetes), @iocanel (kubernetes)
@radcortez can you confirm if this is supported or not? I guess what @matter-it-does is trying to achieve is to provide the following property: quarkus.kubernetes.env.vars."quarkus.rest-client."external-service".url=http://example.com
. The problematic part is the second ."
.
Yes, it is possible. You need to provide either combination:
quarkus.kubernetes.env.vars."quarkus.rest.client".external.service.url=
QUARKUS_KUBERNETES_ENV_VARS__QUARKUS_REST_CLIENT__EXTERNAL_SERVICE_URL=http://example.com
or
quarkus.kubernetes.env.vars."quarkus.rest.client".external.service."url"=
QUARKUS_KUBERNETES_ENV_VARS__QUARKUS_REST_CLIENT__EXTERNAL_SERVICE__URL__=http://example.com
Note that you need to provide the dotted format of the environment variable name to disambiguate dynamic segments in the name. Please check: https://quarkus.io/guides/config-reference#environment-variables
Yes, it is possible. You need to provide either combination:
quarkus.kubernetes.env.vars."quarkus.rest.client".external.service.url= QUARKUS_KUBERNETES_ENV_VARS__QUARKUS_REST_CLIENT__EXTERNAL_SERVICE_URL=http://example.com
or
quarkus.kubernetes.env.vars."quarkus.rest.client".external.service."url"= QUARKUS_KUBERNETES_ENV_VARS__QUARKUS_REST_CLIENT__EXTERNAL_SERVICE__URL__=http://example.com
Note that you need to provide the dotted format of the environment variable name to disambiguate dynamic segments in the name. Please check: https://quarkus.io/guides/config-reference#environment-variables
Many thanks @radcortez !
@radcortez hi! I attached a repro with both of your suggested approaches. Please take a look on why neither worked.
Hum... this is how it is supposed to work, but it seems that the inner key quotes are getting discarded at some point. I need to investigate further.
For now, please use rest client names with a single segment.
Describe the bug
support nested quarkus environment variables.
At build time, if the env var is present like
then at runtime in the pod, the env var should be present like
this way config map etc can be sidestepped to set url for the rest client with config-key: "external-service"
quarkus.rest-client."config-key".url
is the propertyhttps://quarkus.io/guides/all-config#quarkus-rest-client-config_quarkus.rest-client.-config-key-.url
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
Run this command for this example folder. qr_k8s_env_bug.zip
Output of
uname -a
orver
macos
Output of
java -version
17
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.1.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response