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]: Need to cover more error reason messages. #758

Closed
2 tasks done
jmyung opened this issue Nov 17, 2023 · 0 comments · Fixed by #759
Closed
2 tasks done

[Feature]: Need to cover more error reason messages. #758

jmyung opened this issue Nov 17, 2023 · 0 comments · Fixed by #759
Assignees

Comments

@jmyung
Copy link
Contributor

jmyung commented Nov 17, 2023

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?

None

Problem Description

Need to cover more error reasons in pkg/analyzer/pod.go.

8 Error reason messages list to add

  1. PreCreateHookError
  2. CreateContainerError
  3. PreStartHookError
  4. RunContainerError
  5. ImageInspectError
  6. ErrImagePull
  7. ErrImageNeverPull
  8. InvalidImageName

Error definitions in kuberuntime_container.go

1-4 : https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kuberuntime/kuberuntime_container.go#L178

Error definitions in image_manager.go

5-8 : https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/images/image_manager.go#L101

Solution Description

Add conditions in pkg/analyzer/pod.go.

Benefits

More k8s error reason messages can be covered in k8sgpt.

Potential Drawbacks

none

Additional Information

If it is okay, I will submit the PR.

jmyung added a commit to sdsHC/k8sgpt that referenced this issue Nov 17, 2023
Signed-off-by: Jesang Myung <jesang.myung@gmail.com>
@jmyung jmyung changed the title [Feature]: Need to cover more error reasons. [Feature]: Need to cover more error reason messages. Nov 17, 2023
AlexsJones pushed a commit that referenced this issue Nov 20, 2023
* fix: cover more error reasons (#758)

Signed-off-by: Jesang Myung <jesang.myung@gmail.com>

* fix: refactoring for simplify conditions

Signed-off-by: Jesang Myung <jesang.myung@gmail.com>

---------

Signed-off-by: Jesang Myung <jesang.myung@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant