juldrixx commented on code in PR #8240:
URL: https://github.com/apache/nifi/pull/8240#discussion_r1453238105


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-kubernetes-bundle/nifi-framework-kubernetes-state-provider/src/main/java/org/apache/nifi/kubernetes/state/provider/KubernetesConfigMapStateProvider.java:
##########
@@ -99,6 +118,12 @@ public void initialize(final 
StateProviderInitializationContext context) {
         this.logger = context.getLogger();
         this.kubernetesClient = getKubernetesClient();
         this.namespace = new ServiceAccountNamespaceProvider().getNamespace();
+
+        String configMapNamePrefix = 
context.getProperty(CONFIG_MAP_NAME_PREFIX).isSet() ? 
context.getProperty(CONFIG_MAP_NAME_PREFIX).getValue() : null;
+        CONFIG_MAP_NAME_FORMAT = configMapNamePrefix != null
+            ? String.format("%s-%s-%%s", configMapNamePrefix, 
CONFIG_MAP_CORE_NAME) : String.format("%s-%%s", CONFIG_MAP_CORE_NAME);
+        CONFIG_MAP_NAME_PATTERN = Pattern.compile(configMapNamePrefix != null
+            ? String.format("^%s-%s-(.+)$", configMapNamePrefix, 
CONFIG_MAP_CORE_NAME) : String.format("^%s-(.+)$", CONFIG_MAP_CORE_NAME));

Review Comment:
   And `this.identifier` is not the component identifier.



-- 
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-unsubscr...@nifi.apache.org

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

Reply via email to