This is an automated email from the ASF dual-hosted git repository.

zhaijia pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 3b8ce21c5ec7b64b17c357088d82c268a0003477
Author: xiaolong ran <[email protected]>
AuthorDate: Fri Sep 18 10:45:04 2020 +0800

    Set dryrun of KubernetesRuntime is null (#8064)
    
    Signed-off-by: xiaolong.ran <[email protected]>
    
    ### Motivation
    
    In #7994, we upgrade the `client-java` of Kubernetes to `0.9.2`, this will 
cause the following error. During the creation of statefulsets, secrets and 
services, the code has been configured to set the "dryrun" value of "true". 
"true" is not accepted by Kubernetes. Only "All" is allowed. So the value 
should be set to null.
    
    ### Modifications
    
    - Set the `dryrun` of KubernetesRuntime is null.
    (cherry picked from commit ad8abd5d2605f621c32a316f7a415f1ba00df130)
---
 .../pulsar/functions/runtime/kubernetes/KubernetesRuntime.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntime.java
 
b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntime.java
index aff638c..16bfd74 100644
--- 
a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntime.java
+++ 
b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntime.java
@@ -419,7 +419,7 @@ public class KubernetesRuntime implements Runtime {
                 .supplier(() -> {
                     final V1Service response;
                     try {
-                        response = 
coreClient.createNamespacedService(jobNamespace, service, null, "true", null);
+                        response = 
coreClient.createNamespacedService(jobNamespace, service, null, null, null);
                     } catch (ApiException e) {
                         // already exists
                         if (e.getCode() == HTTP_CONFLICT) {
@@ -504,7 +504,7 @@ public class KubernetesRuntime implements Runtime {
                 .supplier(() -> {
                     final V1StatefulSet response;
                     try {
-                        response = 
appsClient.createNamespacedStatefulSet(jobNamespace, statefulSet, null, "true", 
null);
+                        response = 
appsClient.createNamespacedStatefulSet(jobNamespace, statefulSet, null, null, 
null);
                     } catch (ApiException e) {
                         // already exists
                         if (e.getCode() == HTTP_CONFLICT) {
@@ -555,7 +555,7 @@ public class KubernetesRuntime implements Runtime {
                         // https://github.com/kubernetes-client/java/issues/86
                         response = appsClient.deleteNamespacedStatefulSetCall(
                                 statefulSetName,
-                                jobNamespace, null, "true",
+                                jobNamespace, null, null,
                                 5, null, "Foreground",
                                 null, null)
                                 .execute();
@@ -706,7 +706,7 @@ public class KubernetesRuntime implements Runtime {
                         // https://github.com/kubernetes-client/java/issues/86
                         response = coreClient.deleteNamespacedServiceCall(
                                 serviceName,
-                                jobNamespace, null, "true",
+                                jobNamespace, null, null,
                                 0, null,
                                 "Foreground", null, null).execute();
                     } catch (ApiException e) {

Reply via email to