wangyang0918 commented on code in PR #20982:
URL: https://github.com/apache/flink/pull/20982#discussion_r1003122234


##########
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/factory/KubernetesJobManagerFactoryTest.java:
##########
@@ -468,4 +468,37 @@ void testSetJobManagerDeploymentReplicas() throws 
Exception {
         
assertThat(kubernetesJobManagerSpecification.getDeployment().getSpec().getReplicas())
                 .isEqualTo(JOBMANAGER_REPLICAS);
     }
+
+    @Test
+    void testDNSPolicyDefaultValue() throws Exception {
+        kubernetesJobManagerSpecification =
+                
KubernetesJobManagerFactory.buildKubernetesJobManagerSpecification(
+                        flinkPod, kubernetesJobManagerParameters);
+
+        final PodSpec resultPodSpecWithDefaultDNSPolicy =
+                this.kubernetesJobManagerSpecification
+                        .getDeployment()
+                        .getSpec()
+                        .getTemplate()
+                        .getSpec();
+
+        
assertThat(resultPodSpecWithDefaultDNSPolicy.getDnsPolicy()).isEqualTo("ClusterFirst");
+    }
+
+    @Test
+    void testDNSPolicyOverride() throws Exception {

Review Comment:
   This test could be moved to `DecoratorWithPodTemplateTestBase` and renamed 
to `testDNSPolicyWithPodTemplate`. And then it will be executed both for 
`InitJobManagerDecoratorWithPodTemplateTest` and 
`InitTaskManagerDecoratorWithPodTemplateTest`.
   
   The `testDNSPolicyOverwritten` might be added to verify flink config option 
could overwrite the pod template.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to