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

Output reason for deployment pod state failures #22

Open
sekka1 opened this issue Jan 28, 2021 · 0 comments
Open

Output reason for deployment pod state failures #22

sekka1 opened this issue Jan 28, 2021 · 0 comments

Comments

@sekka1
Copy link
Contributor

sekka1 commented Jan 28, 2021

We are able to check for a certain state of a pod per this check: https://github.com/anthem-ai/kubernetes-state-checker/blob/main/conf.sample.yaml#L72

That is cool but it would be nice if it is not in this state for the output error message to output what state it is in:

  • imagePullBackoff
  • pending
  • CrashLoopBackOff
  • Error
  • etc

For example...given this input config:

- ttype: podChecks
  name: Checks that the pod is in a running state
  description: Allows you to check for various aspects of a pod
  namespace: hos-m2
  # Input values for this specific check
  values:
    checksEnabled:
      state:
      # The pod name to act on.  This is a regex field.
      - podName: healthapp-caregaps-*
        desiredState: Running
      - podName: healthapp-caregaps-*
        desiredState: CrashLoopBackOff
      - podName: foo
        desiredState: CrashLoopBackOff

The output is:

+------------------+-----------------------------------------+--------+------------------------------------------------------------------------------------------+
| podChecks        | Checks for various aspects of a service | false  | * Pod healthapp-caregaps-697d57788b-86j8c is in Running state                            |
|                  |                                         |        |                                                                                          |
|                  |                                         |        | * Pod healthapp-caregaps-697d57788b-86j8c is NOT in CrashLoopBackOff state               |
|                  |                                         |        |                                                                                          |
|                  |                                         |        | * Did not find pod: foo                                                                  |
|                  |                                         |        |                                                                                          |
|                  |                                         |        |                                                                                          |
+------------------+-----------------------------------------+--------+------------------------------------------------------------------------------------------+

For the second check:

      - podName: healthapp-caregaps-*
        desiredState: CrashLoopBackOff

The output message should be more descriptive...like what state did it find it in.

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

No branches or pull requests

1 participant