Skip to content

Commit

Permalink
fix: workaround for the failure of pod creation
Browse files Browse the repository at this point in the history
  • Loading branch information
D-D-H committed Mar 20, 2024
1 parent b50bed5 commit 9cb583e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,12 @@ public void scheduleAsync(long identity, long requestedMemSize, BiConsumer<Strin
container.addEnvItem(new V1EnvVar().name("JAVA_TOOL_OPTIONS").value(jvmOptions));
}

pod.spec(new V1PodSpec().addContainersItem(container).addVolumesItem(volume)
.serviceAccountName(config.getServiceAccountName())
.restartPolicy("Never"));
V1PodSpec podSpec = new V1PodSpec().addContainersItem(container).addVolumesItem(volume)
.serviceAccountName(config.getServiceAccountName())
.restartPolicy("Never");
// workaround for https://github.com/kubernetes-client/java/issues/3076
podSpec.setOverhead(null);
pod.spec(podSpec);

api.createNamespacedPod(K8S_NAMESPACE, pod).execute();

Expand Down

0 comments on commit 9cb583e

Please sign in to comment.