gyfora commented on code in PR #377: URL: https://github.com/apache/flink-kubernetes-operator/pull/377#discussion_r978307344
########## flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/deployment/AbstractFlinkResourceReconciler.java: ########## @@ -426,4 +431,17 @@ protected boolean flinkVersionChanged(SPEC oldSpec, SPEC newSpec) { } return false; } + + private void setOwnerReference(CR owner, Configuration deployConfig) { + final Map<String, String> ownerReference = + Map.of( + "apiVersion", owner.getApiVersion(), + "kind", owner.getKind(), + "name", owner.getMetadata().getName(), + "uid", owner.getMetadata().getUid(), + "blockOwnerDeletion", "false", + "controller", "false"); + deployConfig.set( + KubernetesConfigOptions.JOB_MANAGER_OWNER_REFERENCE, List.of(ownerReference)); + } Review Comment: Feels like the `FlinkConfigBuilder` might be a better place for this, then we can be sure that it's universally set in a single place. -- 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...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org