You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to load the config changes into the pod and start using it without pod restart in Micronaut. I have created a sample application to try this out. Used Minikube to the test the changes.
Created 2 simple classes along with the Application.java
DummyConfiguration.java
@Refreshable
@ConfigurationProperties("dummy-configuration")
public class DummyConfiguration {
private String color;
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
}
ConfigResource.java
@Controller("/config")
public class ConfigResource{
private final DummyConfiguration dummyConfiguration;
public ConfigResource(DummyConfiguration dummyConfiguration) {
this.dummyConfiguration = dummyConfiguration;
}
@Get("/color")
public String getColor() {
return "The color is: " + dummyConfiguration.getColor();
}
}
Application.java
import io.micronaut.runtime.Micronaut;
public class Application {
public static void main(String[] args) {
Micronaut.run(Application.class, args);
}
}
According to the micronaut ideally the code also should start populating the new values which isn't happening(https://micronaut-projects.github.io/micronaut-kubernetes/snapshot/guide/). I have changed the color in the configmap and then applied it which isn't reflecting when I am calling the api.
I am new to Micronaut. Not sure what am I missing out. Thanks in Advance.
The text was updated successfully, but these errors were encountered:
Issue description
I want to load the config changes into the pod and start using it without pod restart in Micronaut. I have created a sample application to try this out. Used Minikube to the test the changes.
Created 2 simple classes along with the Application.java
DummyConfiguration.java
ConfigResource.java
Application.java
Dockerfile
configmap.yml
And mounted the configmap.yml to the deployment.yml
Deployment.yml
According to the micronaut ideally the code also should start populating the new values which isn't happening(https://micronaut-projects.github.io/micronaut-kubernetes/snapshot/guide/). I have changed the color in the configmap and then applied it which isn't reflecting when I am calling the api.
I am new to Micronaut. Not sure what am I missing out. Thanks in Advance.
The text was updated successfully, but these errors were encountered: