I'm trying to override configuration properties via environment variables on Quarkus application, compiled and dockerized with native profile.
When I exec into my container, and check the environment variables, I can confirm that the value I expect is there.
In my quarkus app, I have a bean which will log the config properties at startup.
@ApplicationScoped
public class AppLifecycleBean {
@Inject
Configuration configuration;
void onStart(@Observes StartupEvent ev) {
System.out.println("The application is starting...");
System.out.println(configuration.toString());
}
void onStop(@Observes ShutdownEvent ev) {
System.out.println("The application is stopping...");
}
}
The Configuration class looks like this.
@Singleton
public class Configuration {
@ConfigProperty(name = "quarkus.profile")
public String quarkusProfile;
...
@Override
public String toString() {
return "Configuration:\n" +
"quarkusProfile='" + quarkusProfile + "'\n" +
...
}
}
Deploying with Kubernetes, I pass a value for env var QUARKUS_PROFILE of 'FR2', but I still get prod. Is it not possible to override config properties via environment variables with native images ?