Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Getting the error from event for Statefulset Analyzer #1249

Open
2 tasks done
naveenthangaraj03 opened this issue Sep 18, 2024 · 2 comments
Open
2 tasks done
Labels
good first issue Good for newcomers

Comments

@naveenthangaraj03
Copy link
Contributor

naveenthangaraj03 commented Sep 18, 2024

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've discussed this feature request in the K8sGPT Slack and got positive feedback

Is this feature request related to a problem?

Yes

Problem Description

Screenshot 2024-09-18 124356

In above snapshot, there are two statefulset with 0/3 and 0/1, but k8sgpt displays no problem detected. From this we clearly identified that statefulset analyzer is not getting all the errors.

Solution Description

There are two scenario for this:

For some scenario the Statefulset has event if none of the pod is initialized for that we can get the lastest event and display as error and for some scenario which has no events which means some of the pod is initialized but it is in failed state for that we can get the error from the pod.

So that we get to know the clear error from the statefulset analyzer

Benefits

Previously, the statefulset analyzer is not scanning all the errors, if we get the error from this two scenarios we will get to know clear error about the statefulset.

Potential Drawbacks

No response

Additional Information

I have idea to resolve this,

we can check spec.replicas != status.availableReplicas then we can fetch the latest event and display as error or if the events is empty which means pod is initialized then we will print the error from some of the pod which is initialized because not in running state orelse we can get the event for the particular pod if you are ok.

@github-project-automation github-project-automation bot moved this to Proposed in Backlog Sep 18, 2024
@AlexsJones AlexsJones added the good first issue Good for newcomers label Sep 19, 2024
@yankay
Copy link
Contributor

yankay commented Sep 20, 2024

I want to fix it :-)

@naveenthangaraj03
Copy link
Contributor Author

@yankay, I had already created a PR #1256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Proposed
Development

No branches or pull requests

3 participants