feat(checker): disable pod check
@@ -100,10 +100,10 @@ class Checker(object):
pods = r.json()['items']
for pod in pods:
if pod['status']['phase'] not in ['Running', 'Succeeded']:
- self.logger.debug(
- 'Pods checking - pod %s is in %s status' % \
- (pod['metadata']['name'], pod['status']['phase']))
- return False
+ msg = 'Pods checking - pod %s is in %s status' % \
+ (pod['metadata']['name'], pod['status']['phase'])
+ self.logger.debug(msg)
+ self.slack.warning(self.cluster_name, msg)
return True
except Exception as e:
self.logger.exception('Got exception on check pods')
@@ -239,6 +239,10 @@ class CheckerSlackHook(SlackHook):
message = ":arrow_down_red: InfraBox cluster *{}* was deactivated by checker! [{}]".format(cluster_name, reason)
return self._send_wrap_exception(message)
+ def warning(self, cluster_name, msg):
+ message = "WARNING! [{}] {}".format(cluster_name, msg)
+ return self._send_wrap_exception(message)
+
def _send_wrap_exception(self, message):
try:
self.send_status(message)
