Skip to content

Commit

Permalink
refactor: KubernetesSshServiceForwarder uses deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
suw0n authored and manusa committed Jan 16, 2024
1 parent 3e25b6c commit 97c0923
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import io.fabric8.kubernetes.api.model.PodBuilder;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.LocalPortForward;
import io.fabric8.kubernetes.client.dsl.NonDeletingOperation;
import org.eclipse.jkube.kit.common.KitLogger;

import java.io.IOException;
Expand Down Expand Up @@ -110,7 +111,7 @@ private Pod deploySshServerPod() {
.addNewPort().withContainerPort(localService.getPort()).withProtocol("TCP").endPort()
.endContainer().endSpec();
}
return kubernetesClient.pods().resource(pod.build()).createOrReplace();
return kubernetesClient.pods().resource(pod.build()).createOr(NonDeletingOperation::update);
// Using createOrReplace instead of SSA because MockServer doesn't support this PATCH
// unless the resource already exists
// .patch(PatchContext.of(PatchType.SERVER_SIDE_APPLY), pod.build());
Expand Down

0 comments on commit 97c0923

Please sign in to comment.