You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "dmartinol (via GitHub)" <gi...@apache.org> on 2023/11/08 08:38:59 UTC
[I] Application should be restarted when an environment variable value is updated [incubator-kie-kogito-serverless-operator]
dmartinol opened a new issue, #298:
URL: https://github.com/apache/incubator-kie-kogito-serverless-operator/issues/298
### Description
**Steps:**
Deploy a SonataFlow `a`with a ConfigMap `a-props` including the user's application properties. Some properties are defined using env variables like `${ENV_VAR:default}`. Another ConfigMap `a-config` defines the variable's values and is linked to the application using the `spec.podTemplate.container.envFrom.configMapRef.name` field of the SonataFlow resource.
After successful deployment, verify the value of the env vars from the Pod's terminal.
Finally, update the vars value in the `a-config` ConfigMap
**Expected behavior:**
The application should reflect the new env values (either because the Pod is restarted or because the Quarkus application restarts)
**Actual behavior:**
The application doe not reflect the latest values of the injected env vars
### Implementation ideas
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Application should be restarted when an environment variable value is updated [incubator-kie-kogito-serverless-operator]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on issue #298:
URL: https://github.com/apache/incubator-kie-kogito-serverless-operator/issues/298#issuecomment-1802600260
The idea here is to have the `SonataFlow` controller follow the changes on `ConfigMaps` and `Secrets` mounted to the workflow `Deployment` object.
Any time a `ConfigMap` or `Secret` attached to the `Deployment` is changed, the operator should roll out the deployment so the application can be restarted. Another approach is to send a signal to the pod to restart the app, so the configuration is refreshed. Quarkus won't refresh the application properties if the process is not restarted.
I vote for restarting the app instead of rolling out the pod since it's faster. The file system is already updated by k8s. Another line is to research with the Quarkus community if this is the expected behavior since I can see this use case being useful there. We should look up the Microprofile Config component community. If the properties file/environment is updated, so will the app.
The Environment variable is not a problem since it will change the deployment, hence a new rollout will be performed automatically by k8s. Envs from `Secrets` and `ConfigMaps` might be a problem, though.
An implementation idea is to add the controller as one of the owners of the attached configs, so when the target object is updated, the controller is notified. We can then compare the generation, and if it has changed, we then rollout/restart the app.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Application should be restarted when an environment variable value is updated [incubator-kie-kogito-serverless-operator]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini closed issue #298: Application should be restarted when an environment variable value is updated
URL: https://github.com/apache/incubator-kie-kogito-serverless-operator/issues/298
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org