Commit 1d239a2
authored
fix: Only check pod phase in isPodReady (#1127)
The implementation of `isPodReady`doesn't work, when there are
init containers that are sidecars. They stay in `state=running` and
currently this will always make `isPodReady` return false.
This fixes determining readiness of pod containers. If a sidecar container
is added to the `initContainers` of a pod, the status check must check a
`Running` state and not a `Terminated` state.
The `podIsReady` function is rewritten to make use of the container status
conditions. If a condition exists with `Type=Ready` and `Status=True`, it is
considered ready. This removes the investigation of container status for that
purpose.1 parent b9823e1 commit 1d239a2
1 file changed
Lines changed: 36 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
26 | 33 | | |
27 | | - | |
| 34 | + | |
28 | 35 | | |
29 | 36 | | |
30 | 37 | | |
| |||
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
42 | 69 | | |
43 | 70 | | |
44 | | - | |
45 | 71 | | |
46 | 72 | | |
47 | 73 | | |
48 | | - | |
49 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
50 | 81 | | |
51 | 82 | | |
52 | 83 | | |
| |||
0 commit comments