New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quarkus kubernetes sidecars EnvVar do not work #12063
Comments
/cc @geoand |
@metacosm do you want to take a look at this one? |
Yes, I'll take a look. |
A first comment: the format of env vars is wrong in your example, @arturobrzut: you need to use |
Fixes quarkusio#12063. This occurs because the dekorate version of AddEnvVarDecorator inherits from ApplicationContainerDecorator which expects metadata to be present, which doesn't happen in our context. We sidestep the issue by wrapping the original behavior and calling its andThenVisit method, which does the work when not skipped.
Fixes quarkusio#12063. This occurs because the dekorate version of AddEnvVarDecorator inherits from ApplicationContainerDecorator which expects metadata to be present, which doesn't happen in our context. We sidestep the issue by wrapping the original behavior and calling its andThenVisit method, which does the work when not skipped.
Fixes quarkusio#12063. This occurs because the dekorate version of AddEnvVarDecorator inherits from ApplicationContainerDecorator which expects metadata to be present, which doesn't happen in our context. We sidestep the issue by wrapping the original behavior and calling its andThenVisit method, which does the work when not skipped.
Fixes quarkusio#12063. This occurs because the dekorate version of AddEnvVarDecorator inherits from ApplicationContainerDecorator which expects metadata to be present, which doesn't happen in our context. We sidestep the issue by wrapping the original behavior and calling its andThenVisit method, which does the work when not skipped.
Describe the bug
Hi,
I am trying to generate sidecar configs with env variables using quarkus application.properties. I have below in my application.properties.
quarkus.kubernetes-client.trust-certs=true
quarkus.container-image.name=supersonicjava
quarkus.container-image.registry=quay.io
quarkus.container-image.group=arturobrzut
quarkus.kubernetes.sidecars.mariadb.image= mariadb:10.5.5
quarkus.kubernetes.sidecars.mariadb.env-vars.MYSQL_DATABASE.name=my
quarkus.kubernetes.sidecars.mariadb.env-vars.MYSQL_ROOT_PASSWORD.name=pass
quarkus.kubernetes.sidecars.mariadb.env-vars.MYSQL_USER.name=root
quarkus.hibernate-orm.database.generation = drop-and-create
It is supposed to configure env var inside container mariadb in kubernetes.yml. But it is not.
When I set mount points in sidecar or command in sidecar it works, but env variables not
Env variable works on POD level also, but inside sidecar not
Expected behavior
Sidecar container should contain env variable in kubernetes.yml
Actual behavior
Sidecar container does not contain env var
To Reproduce
Steps to reproduce the behavior:
Configuration
# Add your application.properties here, if applicable.
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
Output of
uname -a
orver
:uname -a
Linux my 4.18.0-193.14.3.el8_2.x86_64 Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP Mon Jul 20 15:02:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
:java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment 18.9 (build 11.0.8+10)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.8+10, mixed mode)
GraalVM version (if different from Java):
GraalVM and Java the same mandrel-java11-20.1.0.1.Final
Quarkus version or git rev:
<quarkus-plugin.version>1.7.3.Final</quarkus-plugin.version>
Build tool (ie. output of
mvnw --version
orgradlew --version
):./mvnw --version ✔
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/aobrzut/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3
Java version: 11.0.8, vendor: N/A, runtime: /home/aobrzut/tools/graalvm/mandrel/mandrel-java11-20.1.0.1.Final
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.18.0-193.14.3.el8_2.x86_64", arch: "amd64", family: "unix"
Additional context
based on doc
https://quarkus.io/guides/kubernetes
The text was updated successfully, but these errors were encountered: