Skip to content

Commit

Permalink
fix: ignore 'RecreatingFailedPod' event reason for StatefulSets due t…
Browse files Browse the repository at this point in the history
…o bug in 1.27
  • Loading branch information
a7i committed Nov 22, 2023
1 parent d31aa15 commit 3c6ad7a
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,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"
]
}.freeze

Expand Down
Original file line number Diff line number Diff line change
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 3c6ad7a

Please sign in to comment.