zezaeoh commented on code in PR #377: URL: https://github.com/apache/flink-kubernetes-operator/pull/377#discussion_r979518665
########## 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: @gyfora I tried it but, the problem is with the apiVersion and kind Is there a good way to add the apiVersion and kind of a CustomResource, if not in the `AbstractFlinkResourceReconciler`? -- 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