You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/08 08:01:18 UTC

[GitHub] [flink-kubernetes-operator] gyfora commented on a diff in pull request #304: [FLINK-28445] Support operator configuration from multiple configmaps

gyfora commented on code in PR #304:
URL: https://github.com/apache/flink-kubernetes-operator/pull/304#discussion_r916559172


##########
flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/config/FlinkConfigManagerTest.java:
##########
@@ -163,4 +171,19 @@ public void testConfUpdateAndCleanup() {
                         .getObserveConfig(deployment)
                         .get(KubernetesOperatorConfigOptions.OPERATOR_RECONCILE_INTERVAL));
     }
+
+    @Test
+    public void testDynamicConfiguration(@TempDir Path dynamicConfigDir) throws IOException {

Review Comment:
   Similarly to my previous config lets call this `confOverrideDirTest` or something like that



##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/config/FlinkConfigManager.java:
##########
@@ -211,11 +212,28 @@ protected Cache<Key, Configuration> getCache() {
         return cache;
     }
 
+    private static Configuration loadGlobalConfiguration() {
+        return loadGlobalConfiguration(EnvUtils.get(EnvUtils.ENV_DYNAMIC_CONF_DIR));
+    }
+
+    @VisibleForTesting
+    protected static Configuration loadGlobalConfiguration(Optional<String> dynamicConfigDir) {
+        if (dynamicConfigDir.isPresent()) {
+            Configuration dynamicConfigs =
+                    GlobalConfiguration.loadConfiguration(dynamicConfigDir.get());
+            LOG.debug(
+                    "Loading default configuration with overrides from " + dynamicConfigDir.get());
+            return GlobalConfiguration.loadConfiguration(dynamicConfigs);
+        }

Review Comment:
   I think we should not call this "dynamic" as it confuses things with the actual dynamic reloading of the configuraiton. 
   
   We could mayve call it `ENV_CONF_OVERRIDE_DIR` and `confOverrideDir` respectively



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org