core: force delete rook-ceph-exporter pod

Force delete rook-ceph-exporter pod that is stuck in terminating
state due to unavailability of node.

Signed-off-by: sp98 <sapillai@redhat.com>
This commit is contained in:
sp98
2023-07-24 20:50:26 +05:30
parent cb44c7b88f
commit dd90ef5db2
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -323,6 +323,7 @@ func (c *cephStatusChecker) getRookPodsOnNode(node string) ([]v1.Pod, error) {
"rook-ceph-mgr",
"rook-ceph-mds",
"rook-ceph-rgw",
"rook-ceph-exporter",
}
podsOnNode := []v1.Pod{}
listOpts := metav1.ListOptions{
+2 -1
View File
@@ -335,6 +335,7 @@ func TestGetRookPodsOnNode(t *testing.T) {
{"app": "rook-ceph-rgw"},
{"app": "user-app"},
{"app": "rook-ceph-mon"},
{"app": "rook-ceph-exporter"},
}
pod := v1.Pod{
@@ -362,7 +363,7 @@ func TestGetRookPodsOnNode(t *testing.T) {
pods, err := c.getRookPodsOnNode("node0")
assert.NoError(t, err)
// A pod is having two matching labels and its returned only once
assert.Equal(t, 11, len(pods))
assert.Equal(t, 12, len(pods))
podNames := []string{}
for _, pod := range pods {