Skip to content

Commit

Permalink
update kubernetes-client version
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoppii13 committed Mar 9, 2022
1 parent a1d842c commit 271044b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion digdag-standards/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies {
}

// kubernetes
compile ('io.fabric8:kubernetes-client:4.6.2') {
compile ('io.fabric8:kubernetes-client:5.12.1') {
// Avoid compilation failures due to dependencies
exclude group: 'org.slf4j', module: 'slf4j-api'
// TODO: digdag use version 3.12.0, upgrade to version 3.12.6.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io.fabric8.kubernetes.api.model.ContainerStatus;
import io.fabric8.kubernetes.api.model.EnvVar;
import io.fabric8.kubernetes.api.model.EnvVarBuilder;
import io.fabric8.kubernetes.api.model.PodBuilder;
import io.fabric8.kubernetes.api.model.PodSpec;
import io.fabric8.kubernetes.api.model.PodSpecBuilder;
import io.fabric8.kubernetes.api.model.Quantity;
Expand Down Expand Up @@ -51,15 +52,16 @@ public Pod runPod(final CommandContext context, final CommandRequest request,
{
final Container container = createContainer(context, request, name, commands, arguments);
final PodSpec podSpec = createPodSpec(context, request, container);
final io.fabric8.kubernetes.api.model.Pod pod = client.pods()
.inNamespace(client.getNamespace())
.createNew()
.withNewMetadata()
.withName(name)
.withLabels(getPodLabels())
.endMetadata()
.withSpec(podSpec)
.done();
final io.fabric8.kubernetes.api.model.Pod pod = client.pods().inNamespace(client.getNamespace()).create(
new PodBuilder()
.withNewMetadata()
.withName(name)
.withLabels(getPodLabels())
.withNamespace(client.getNamespace())
.endMetadata()
.withSpec(podSpec)
.build()
);
return Pod.of(pod);
}

Expand Down

0 comments on commit 271044b

Please sign in to comment.