blublinsky commented on a change in pull request #14591:
URL: https://github.com/apache/flink/pull/14591#discussion_r563796008
##########
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:
1. When deleted, job manager will clean up all all of the resources
associated with the cluster, as a result, we only need to delete a job manager
to delete a cluster.
2. As for multiple owner references, see here
https://medium.com/@bharatnc/kubernetes-garbage-collection-781223f03c17. If an
object contains more than one owner reference, it will only be deleted when
both of them are deleted. Although it is possible, its rarely used. An example
configuration is in KubernetesJobManagerFactoryTest.java
----------------------------------------------------------------
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:
[email protected]