Skip to content

Commit

Permalink
Include ContainerCreating in k8s pod waiting status reasons (#2063)
Browse files Browse the repository at this point in the history
Include ContainerCreating in pod waiting status reasons
  • Loading branch information
deiwin authored and masci committed Sep 19, 2018
1 parent ce21061 commit 82dc17d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_clustername():
METRIC_TYPES = ['counter', 'gauge']

# As case can vary depending on Kubernetes versions, we match the lowercase string
WHITELISTED_WAITING_REASONS = ['errimagepull', 'imagepullbackoff', 'crashloopbackoff']
WHITELISTED_WAITING_REASONS = ['errimagepull', 'imagepullbackoff', 'crashloopbackoff', 'containercreating']
WHITELISTED_TERMINATED_REASONS = ['oomkilled', 'containercannotrun', 'error']


Expand Down
5 changes: 3 additions & 2 deletions kubernetes_state/tests/test_kubernetes_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@
'namespace:kube-system'
],
NAMESPACE + '.container.status_report.count.waiting': [
'reason:CrashLoopBackoff',
'reason:CrashLoopBackOff',
'reason:ContainerCreating',
'reason:CrashLoopBackoff', # Lowercase "off"
'reason:CrashLoopBackOff', # Uppercase "Off"
'reason:ErrImagePull',
'reason:ImagePullBackoff',
'pod:kube-dns-1326421443-hj4hx',
Expand Down

0 comments on commit 82dc17d

Please sign in to comment.