From c8ce86b979c9e2da11271c27e95ffa9633eee9d2 Mon Sep 17 00:00:00 2001 From: Illia Shestakov Date: Mon, 29 Apr 2024 15:12:29 +0300 Subject: [PATCH] fix: do not fail on start when there are no persistent volume claims Persistent volume claims are being created alongside with other objects to acheive that. --- .../20240619_122432_illia_k8s_no_volumes_no_fail.md | 1 + tutor/commands/k8s.py | 11 ++--------- 2 files changed, 3 insertions(+), 9 deletions(-) create mode 100644 changelog.d/20240619_122432_illia_k8s_no_volumes_no_fail.md diff --git a/changelog.d/20240619_122432_illia_k8s_no_volumes_no_fail.md b/changelog.d/20240619_122432_illia_k8s_no_volumes_no_fail.md new file mode 100644 index 0000000..a1c8e52 --- /dev/null +++ b/changelog.d/20240619_122432_illia_k8s_no_volumes_no_fail.md @@ -0,0 +1 @@ +[Bugfix] Do not fail on start when there are not persistent volume claims to apply (by @snglth) diff --git a/tutor/commands/k8s.py b/tutor/commands/k8s.py index b761fd0..6d39ec7 100644 --- a/tutor/commands/k8s.py +++ b/tutor/commands/k8s.py @@ -296,18 +296,11 @@ def start(context: K8sContext, names: List[str]) -> None: names = names or ["all"] for name in names: if name == "all": - # Create volumes - kubectl_apply( - context.root, - "--wait", - "--selector", - "app.kubernetes.io/component=volume", - ) - # Create everything else except jobs + # Create everything except jobs kubectl_apply( context.root, "--selector", - "app.kubernetes.io/component notin (job,volume,namespace)", + "app.kubernetes.io/component notin (job,namespace)", ) else: kubectl_apply(