Skip to content

Commit

Permalink
Merge pull request #4081 from zendesk/amir/statefulset-RecreatingFail…
Browse files Browse the repository at this point in the history
…edPod

fix: ignore 'RecreatingFailedPod' event reason for StatefulSets due to bug in 1.27
  • Loading branch information
a7i committed Mar 11, 2024
2 parents fd351f2 + 9f8e146 commit a6a8ba2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/kubernetes/app/models/kubernetes/resource_status.rb
Expand Up @@ -26,6 +26,11 @@ class ResourceStatus
Service: [
"FailedToUpdateEndpointSlices"
],
StatefulSet: [
# Regression from k8s 1.27: https://github.com/kubernetes/kubernetes/pull/115331
# Pending backport in: https://github.com/kubernetes/kubernetes/pull/121921
"RecreatingFailedPod"
],
# karmada can fail to sync a resource when something else also updated the resource,
# this does not necessarily indicate that sync will be broken forever
All: [
Expand Down
Expand Up @@ -90,6 +90,12 @@ def expect_event_request(&block)
expect_event_request { details.must_equal "Live" }
end

it "ignores known bad events for statefulset" do
resource[:kind] = "StatefulSet"
events[0].merge!(type: "Warning", reason: "RecreatingFailedPod")
expect_event_request { details.must_equal "Live" }
end

describe "with bad event" do
before { events[0].merge!(type: "Warning", reason: "Boom") }

Expand Down

0 comments on commit a6a8ba2

Please sign in to comment.