[ https://issues.apache.org/jira/browse/FLINK-21383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17427025#comment-17427025 ]
David Morávek edited comment on FLINK-21383 at 10/11/21, 9:12 AM: ------------------------------------------------------------------ [~wangyang0918] IMO mounting config-maps this way is a bad practice anyway, because change to the config-map doesn't restart pods, so you're not actually sure if your configuration is up-to-date. What we usually did was adding a unique suffix to the config-map name, which has been changed with each update (deployments also need to be updated accordingly, but this kind of goes hand-in-hand with the declarative nature of the Kubernetes API). I agree that log4j configuration is a bit different story as log4j supports dynamic re-loading of the configuration. I'm not sure if that's something we officially want to support (by documenting it) though, because than it may have other side-effects, like not having up-to-date flink-conf.yaml if not used carefully. was (Author: davidmoravek): [~wangyang0918] IMO mounting config-maps this way is a bad practice anyway, because change to the config-map doesn't restart pods, so you're not actually sure if your configuration is up-to-date. What we usually did was adding a unique suffix to the config-map name, which has been changed with each update (deployments also need to be updated accordingly, but this kind of goes hand-in-hand with the declarative nature of the Kubernetes API). I agree that log4j configuration is a bit different story as we log4j supports dynamic re-loading of the configuration. I'm not sure if that's something we officially want to support (by documenting it) though, because than it may have other side-effects, like not having up-to-date flink-conf.yaml if not used carefully. > Docker image does not play well together with ConfigMap based flink-conf.yamls > ------------------------------------------------------------------------------ > > Key: FLINK-21383 > URL: https://issues.apache.org/jira/browse/FLINK-21383 > Project: Flink > Issue Type: Bug > Components: Deployment / Kubernetes, flink-docker > Affects Versions: 1.11.3, 1.12.1, 1.13.0 > Reporter: Till Rohrmann > Priority: Minor > Labels: auto-deprioritized-major, usability > > Flink's Docker image does not play well together with ConfigMap based > flink-conf.yamls. The {{docker-entrypoint.sh}} script offers a few env > variables to overwrite configuration values (e.g. {{FLINK_PROPERTIES}}, > {{JOB_MANAGER_RPC_ADDRESS}}, etc.). The problem is that the entrypoint script > assumes that it can modify the existing {{flink-conf.yaml}}. This is not the > case if the {{flink-conf.yaml}} is based on a {{ConfigMap}}. > Making things worse, failures updating the {{flink-conf.yaml}} are not > reported. Moreover, the called {{jobmanager.sh}} and {{taskmanager.sh}} > scripts don't support to pass in dynamic configuration properties into the > processes. > I think the problem is that our assumption that we can modify the > {{flink-conf.yaml}} does not always hold true. If we updated the final > configuration from within the Flink process (dynamic properties and env > variables), then this problem could be avoided. -- This message was sent by Atlassian Jira (v8.3.4#803005)