Skip to content

Commit

Permalink
Fix K3S start command (#7677)
Browse files Browse the repository at this point in the history
Replace `--no-deploy` and use `--disable` instead.

Fixes #6770

---------

Co-authored-by: Eddú Meléndez <eddu.melendez@gmail.com>
  • Loading branch information
tgeens and eddumelendez committed Oct 24, 2023
1 parent 8864895 commit 0c52c41
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public K3sContainer(DockerImageName dockerImageName) {
tmpFsMapping.put("/var/run", "");
setTmpFsMapping(tmpFsMapping);

setCommand("server", "--no-deploy=traefik", "--tls-san=" + this.getHost());
setCommand("server", "--disable=traefik", "--tls-san=" + this.getHost());
setWaitStrategy(new LogMessageWaitStrategy().withRegEx(".*Node controller sync successful.*"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ public class OfficialClientK3sContainerTest {

@Test
public void shouldStartAndHaveListableNode() throws IOException, ApiException {
try (
// starting_k3s {
K3sContainer k3s = new K3sContainer(DockerImageName.parse("rancher/k3s:v1.21.3-k3s1"))
.withLogConsumer(new Slf4jLogConsumer(log))
// }
) {
runK3s(DockerImageName.parse("rancher/k3s:v1.21.3-k3s1"));
}

@Test
public void shouldStartAndHaveListableNodeUsingLowerVersion() throws IOException, ApiException {
runK3s(DockerImageName.parse("rancher/k3s:v1.20.15-k3s1"));
}

private void runK3s(DockerImageName k3sDockerImage) throws IOException, ApiException {
try (K3sContainer k3s = new K3sContainer(k3sDockerImage).withLogConsumer(new Slf4jLogConsumer(log))) {
k3s.start();

// connecting_with_k8sio {
Expand Down

0 comments on commit 0c52c41

Please sign in to comment.