xintongsong commented on a change in pull request #14591:
URL: https://github.com/apache/flink/pull/14591#discussion_r563457159



##########
File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -89,6 +89,17 @@
                                     + TASK_MANAGER_SERVICE_ACCOUNT.key()
                                     + "' for jobmanager and taskmanager 
respectively.");
 
+    public static final ConfigOption<List<Map<String, String>>> 
JOB_MANAGER_OWNER_REFERENCE =
+            key("kubernetes.jobmanager.owner.reference")
+                    .mapType()
+                    .asList()
+                    .noDefaultValue()
+                    .withDescription(
+                            "The user-specified owner reference to be set to 
the JobManager Deployment. "
+                                    + "The owner reference is used to delete 
deployment (and the actual cluster) when controlling resource is deleted. "
+                                    + "The value should be in the form of 
key:value,where keys define owner reference parameters: apiVersion, "

Review comment:
       I think the following two things are not very clear to me after reading 
the description.
   - Why is the owner reference only set for JobManager. Are other resources 
guaranteed to be cleaned up? We might want to make it more explicit that 
"delete the actual cluster" means all resources are cleaned up.
   - How exactly to use the configuration option. I would suggest to add an 
example (with multiple owner references).

##########
File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -89,6 +89,17 @@
                                     + TASK_MANAGER_SERVICE_ACCOUNT.key()
                                     + "' for jobmanager and taskmanager 
respectively.");
 
+    public static final ConfigOption<List<Map<String, String>>> 
JOB_MANAGER_OWNER_REFERENCE =
+            key("kubernetes.jobmanager.owner.reference")
+                    .mapType()
+                    .asList()
+                    .noDefaultValue()
+                    .withDescription(
+                            "The user-specified owner reference to be set to 
the JobManager Deployment. "
+                                    + "The owner reference is used to delete 
deployment (and the actual cluster) when controlling resource is deleted. "
+                                    + "The value should be in the form of 
key:value,where keys define owner reference parameters: apiVersion, "

Review comment:
       nit:
   ```suggestion
                                       + "The value should be in the form of 
key:value, where keys define owner reference parameters: apiVersion, "
   ```




----------------------------------------------------------------
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.

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


Reply via email to