k8s: kbs: Properly delete ita kustomization

The ita kustomization for Trustee, as well as previously used one
(DCAP), doesn't have a $(uname -m) directory after the deployment
directory name.

Let's follow the same logic used for the deploy-kbs script and clean
those up accordingly.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
Fabiano Fidêncio
2024-09-27 20:32:19 +02:00
parent bafa527be0
commit 66bcfe7369

View File

@@ -224,7 +224,12 @@ kbs_uninstall_cli() {
#
function kbs_k8s_delete() {
pushd "$COCO_KBS_DIR"
kubectl delete -k config/kubernetes/overlays/$(uname -m)
if [ "${KATA_HYPERVISOR}" = "qemu-tdx" ]; then
kubectl delete -k config/kubernetes/ita
else
kubectl delete -k config/kubernetes/overlays/$(uname -m)
fi
# Verify that KBS namespace resources were properly deleted
cmd="kubectl get all -n $KBS_NS 2>&1 | grep 'No resources found'"
waitForProcess "120" "30" "$cmd"