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

Describe the "reasons" config-field #140

Open
Figedi opened this issue Sep 9, 2022 · 1 comment
Open

Describe the "reasons" config-field #140

Figedi opened this issue Sep 9, 2022 · 1 comment

Comments

@Figedi
Copy link

Figedi commented Sep 9, 2022

Is your feature request related to a problem? Please describe.
As it is a very handy feature to not alert on every pod shutting down/killing/whatever event, the reasons field could be very handy. However, there is
a) no mentioning about it except this github repo (its missing on the page)
b) there is no documentation about it (e.g. about what potential values are)

This makes it very hard to start using it
Describe the solution you'd like
Having a config-field which expects certain enums should document the enum-values

@abahmed abahmed added this to kwatch Sep 19, 2022
@abahmed abahmed moved this to 📋 Backlog in kwatch Sep 19, 2022
@thomasLeclaire
Copy link
Contributor

Hey! I got a look on this subject in hope to improve filter of Error.

concretely for now, kwatch grab the reason field from the kubernetes-provided field for container.State.*.Reason :
cf https://github.com/abahmed/kwatch/blob/main/controller/controller.go#L196

For a such field, I was unable to find some explicit docs from kubernetes, field is considered Experimental so they don't provide more details and it sounds this field can be provided by the container itself. We can only find that "reason is a unique, one-word, CamelCase"

from a few search here a list (probably incomplete and not up to date however ) :

For Waiting container status it is possible to get one of following reason:

ContainerCreating,
CrashLoopBackOff,
ErrImagePull,
ImagePullBackOff,
CreateContainerConfigError,
InvalidImageName,
CreateContainerError.

For Terminated container status there are different list of reasons:
OOMKilled,
Error,
Completed,
ContainerCannotRun,
DeadlineExceeded

if it can help someone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants