feat: error from events for STS analyzer #1256
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #
📑 Description
Need to get the error from event for statefulset analyzer, previously it doesn't get the clear error from this analyzer, in the below image there are two statefulset with 0/3 and 0/1 but it doesn't get the error.
![Screenshot 2024-09-18 124356](https://private-user-images.githubusercontent.com/166512789/369373471-e2c6f27d-5be0-4192-bef8-1118ca82f568.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzY0NzcsIm5iZiI6MTczOTYzNjE3NywicGF0aCI6Ii8xNjY1MTI3ODkvMzY5MzczNDcxLWUyYzZmMjdkLTViZTAtNDE5Mi1iZWY4LTExMThjYTgyZjU2OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQxNjE2MTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kN2Y2NzkxODM3YzAxMDMzMDVlY2Y2YmU0NDcyZmYyNDkwMzVhMjAyNTc4NjViZTBjY2Y0MjUwZDVkNGY1YTRlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.lFhnTof_FU0XJKvpexvahSO3RREPLBCUC2vkfhiKw9M)
After getting the error from event for statefulset and if there is no event then it will check the pod is in running state or not
![Screenshot 2024-09-19 165409](https://private-user-images.githubusercontent.com/166512789/369373657-68cb46d2-2570-4638-a5eb-fb5340e31e1f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzY0NzcsIm5iZiI6MTczOTYzNjE3NywicGF0aCI6Ii8xNjY1MTI3ODkvMzY5MzczNjU3LTY4Y2I0NmQyLTI1NzAtNDYzOC1hNWViLWZiNTM0MGUzMWUxZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQxNjE2MTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNDdlOGVlZDFiNGY1NGJkZWI0MjdjN2RmYjQwNGU0NjJjODMwMzdjYzZlMTQzOTVlM2ZjZDY3ZDk3OWIzZGQ3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Wi_2zWkCUyE3uSWWl1dH3uTxcuuAiTb4bcgFpV_VMlo)
✅ Checks
ℹ Additional Information