From d5e639afd2a12f6d5065f50bafb35a8f26866566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Krop=C3=A1=C4=8Dek?= Date: Sat, 8 Feb 2025 16:16:23 +0100 Subject: [PATCH] fixed a mistake --- tasks/k3s.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/k3s.py b/tasks/k3s.py index 5d8a426..d380276 100644 --- a/tasks/k3s.py +++ b/tasks/k3s.py @@ -3,6 +3,8 @@ from pyinfra.api import deploy from pyinfra.facts import files from pyinfra.operations import files as files_op from pyinfra.operations import server + +K3S_COMMON_FLAGS = "--disable local-storage --disable=servicelb --disable=traefik" IS_CREATED_FILE = "/pyinfra/.k3s-init-completed" @deploy("Deploy K3S") @@ -25,7 +27,7 @@ def deploy_k3s(): name="Start K3S master", commands=[ "curl -sfL https://get.k3s.io | " - "sh -s - server --cluster-init", + f"sh -s - server --cluster-init {K3S_COMMON_FLAGS}", ], _env=dict(K3S_TOKEN=k3s_config.get("token")), ) @@ -34,7 +36,7 @@ def deploy_k3s(): name="Start K3S worker", commands=[ "curl -sfL https://get.k3s.io | " - f"sh -s - server --server https://{k3s_config.get('master')}:6443", + f"sh -s - server --server https://{k3s_config.get('master')}:6443 {K3S_COMMON_FLAGS}", ], _env=dict(K3S_TOKEN=k3s_config.get("token")), )