From 766c6b4bbd378c8785f4e501c32d4fc13cac3402 Mon Sep 17 00:00:00 2001 From: Jack Kleeman Date: Mon, 4 Mar 2024 17:30:12 +0000 Subject: [PATCH] Delete correct pod name, ensure pods may be deleted --- charts/restate-operator-helm/templates/rbac.yaml | 2 ++ src/reconcilers/compute.rs | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/restate-operator-helm/templates/rbac.yaml b/charts/restate-operator-helm/templates/rbac.yaml index 32c0bc0..24a8558 100644 --- a/charts/restate-operator-helm/templates/rbac.yaml +++ b/charts/restate-operator-helm/templates/rbac.yaml @@ -46,6 +46,7 @@ rules: - networkpolicies - statefulsets - persistentvolumeclaims + - pods verbs: - get - list @@ -59,6 +60,7 @@ rules: - resources: - statefulsets - networkpolicies + - pods verbs: - delete apiGroups: diff --git a/src/reconcilers/compute.rs b/src/reconcilers/compute.rs index 3a79083..40ab628 100644 --- a/src/reconcilers/compute.rs +++ b/src/reconcilers/compute.rs @@ -471,9 +471,7 @@ async fn check_pia( ); // delete pod to try again next time - pod_api - .delete("restate-canary", &Default::default()) - .await?; + pod_api.delete(name, &Default::default()).await?; Ok(false) }