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

Completed Pods are coloured red #34

Open
johscheuer opened this issue Jun 24, 2020 · 1 comment
Open

Completed Pods are coloured red #34

johscheuer opened this issue Jun 24, 2020 · 1 comment

Comments

@johscheuer
Copy link

Hi,

when I create a CronJob with the following spec:

apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: sleepy
spec:
  schedule: "*/2 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: resting
            image: busybox
            command: ["/bin/sleep"]
            args: ["3"]
          restartPolicy: Never

and when I use kubectl tree after a Job was created and has successful completed the Reason PodCompleted will be coloured red. I assume (without looking in the code) that the Reason is always coloured red if the Pod is not ready? For me red means normally some kind of a failure what about changing the colour of the Reason PodCompleted to green (or something similar)?

 kubectl tree cronjob sleepy
NAMESPACE  NAME                    READY  REASON        AGE
default    CronJob/sleepy          -                    62s
default    └─Job/me-sleep          -                    9s
default      └─Pod/me-sleep-qkhxm  False  PodCompleted  9s
@ahmetb
Copy link
Owner

ahmetb commented Jun 24, 2020

I believe the code looks for Ready condition in the status.

We should probably fix this, but we need to probably make a one-off exception for PodCompleted.

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

2 participants