tillrohrmann commented on a change in pull request #14629:
URL: https://github.com/apache/flink/pull/14629#discussion_r584529114



##########
File path: 
docs/content.zh/docs/deployment/resource-providers/native_kubernetes.md
##########
@@ -324,4 +324,240 @@ $ kubectl create clusterrolebinding 
flink-role-binding-flink --clusterrole=edit
 
 Please refer to the official Kubernetes documentation on [RBAC 
Authorization](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) 
for more information.
 
+### Pod Template
+
+Flink allows users to define the JobManager and TaskManager pods via template 
files. This allows to support advanced features
+that are not supported by Flink [Kubernetes config options]({{< ref 
"docs/deployment/config" >}}#kubernetes) directly.
+Use [`kubernetes.pod-template-file`]({{< ref "docs/deployment/config" 
>}}#kubernetes-pod-template-file)
+to specify a local file that contains the pod definition. It will be used to 
initialize the JobManager and TaskManager.
+The main container should be defined with name `flink-main-container`.
+Please refer to the [pod template example](#example-of-pod-template) for more 
information.
+
+#### Fields Overwritten by Flink
+
+Some fields of the pod template will be overwritten by Flink.
+The mechanism for resolving effective field values can be categorized as 
follows:
+* **Defined by Flink:** User cannot configure it.
+* **Defined by the user:** User can freely specify this value. Flink framework 
won't set any additional values and the effective value derives from the config 
option and the template.
+
+  Precedence order: First an explicit config option value is taken, then the 
value in pod template and at last the default value of a config option if 
nothing is specified.
+* **Merged with Flink:** Flink will merge values for a setting with a user 
defined value (see precedence order for "Defined by the user"). Flink values 
have precedence in case of same name fields.
+
+Refer to the following tables for the full list of pod fields that will be 
overwritten.
+All the fields defined in the pod template that are not listed in the tables 
will be unaffected.
+
+**Pod Metadata**
+<table class="table table-bordered">
+    <thead>
+        <tr>
+            <th class="text-left" style="width: 10%">Key</th>
+            <th class="text-left" style="width: 20%">Category</th>
+            <th class="text-left" style="width: 30%">Related Config 
Options</th>
+            <th class="text-left" style="width: 40%">Description</th>
+        </tr>
+    </thead>
+    <tbody>
+        <tr>
+            <td>name</td>
+            <td>Defined by Flink</td>
+            <td></td>
+            <td>The JobManager pod name will be overwritten with the 
deployment which is defined by <a href="{{< ref "docs/deployment/config" 
>}}#kubernetes-cluster-id">kubernetes.cluster-id</a>.
+                The TaskManager pod names will be overwritten with the pattern 
<code>&lt;clusterID&gt;-&lt;attempt&gt;-&lt;index&gt;</code> which is generated 
by Flink ResourceManager.</td>
+        </tr>
+        <tr>
+            <td>namespace</td>
+            <td>Defined by the user</td>
+            <td><a href="{{< ref "docs/deployment/config" 
>}}#kubernetes-namespace">kubernetes.namespace</a></td>
+            <td>Both the JobManager deployment and TaskManager pods will be 
created in the specified namespace.</td>
+        </tr>
+        <tr>
+            <td>ownerReferences</td>
+            <td>Defined by the user</td>
+            <td><a href="{{< ref "docs/deployment/config" 
>}}#kubernetes-jobmanager-owner-reference">kubernetes.jobmanager.owner.reference</a></td>
+            <td>The owner reference of JobManager deployment could be set by 
configuration option.
+                And the owner reference of every TaskManager pod will be set 
to JobManager deployment.</td>

Review comment:
       Sounds good to make these values then "defined by Flink".




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