Skip to content

Commit 60bf1ca

Browse files
committed
setup: remove checks and mentions of kubectl
Since we won't be using kubectl, there is no reason for it to be in the setup command.
1 parent d47241e commit 60bf1ca

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

src/warnet/project.py

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -136,25 +136,6 @@ def is_docker_desktop_running() -> tuple[bool, str]:
136136
except FileNotFoundError as err:
137137
return False, str(err)
138138

139-
def is_kubectl_installed() -> tuple[bool, str]:
140-
try:
141-
version_result = subprocess.run(
142-
["kubectl", "version", "--client"],
143-
capture_output=True,
144-
text=True,
145-
)
146-
location_result = subprocess.run(
147-
["which", "kubectl"],
148-
capture_output=True,
149-
text=True,
150-
)
151-
if version_result.returncode == 0 and location_result.returncode == 0:
152-
return True, location_result.stdout.strip()
153-
else:
154-
return False, ""
155-
except FileNotFoundError as err:
156-
return False, str(err)
157-
158139
def is_helm_installed() -> tuple[bool, str]:
159140
try:
160141
version_result = subprocess.run(["helm", "version"], capture_output=True, text=True)
@@ -210,12 +191,6 @@ def check_installation(tool_info: ToolInfo) -> ToolStatus:
210191
install_instruction="Please make sure minikube is running",
211192
install_url="https://minikube.sigs.k8s.io/docs/start/",
212193
)
213-
kubectl_info = ToolInfo(
214-
tool_name="Kubectl",
215-
is_installed_func=is_kubectl_installed,
216-
install_instruction="Install kubectl.",
217-
install_url="https://kubernetes.io/docs/tasks/tools/install-kubectl/",
218-
)
219194
helm_info = ToolInfo(
220195
tool_name="Helm",
221196
is_installed_func=is_helm_installed,
@@ -241,7 +216,7 @@ def check_installation(tool_info: ToolInfo) -> ToolStatus:
241216
print(" ╰───────────────────────────╯ ")
242217
print(" ")
243218
print(" Let's find out if your system has what it takes to run Warnet...")
244-
print("")
219+
print(" ")
245220

246221
try:
247222
questions = [
@@ -270,7 +245,6 @@ def check_installation(tool_info: ToolInfo) -> ToolStatus:
270245
if is_platform_darwin():
271246
check_results.append(check_installation(minikube_version_info))
272247
check_results.append(check_installation(minikube_running_info))
273-
check_results.append(check_installation(kubectl_info))
274248
check_results.append(check_installation(helm_info))
275249
else:
276250
click.secho("Please re-run setup.", fg="yellow")

0 commit comments

Comments
 (0)