Skip to content
Snippets Groups Projects
Unverified Commit 5dbcf110 authored by Varac's avatar Varac
Browse files

Ignore KubeAPIDown alert in CI

parent ed274a32
No related branches found
No related tags found
Loading
......@@ -11,47 +11,15 @@ def ignore_alert(alert):
equals "none", or in some application specific cases.
"""
# Ignore watchdog alerts
if alert["labels"]["severity"] == "none":
return True
# Ignore `KubeAPILatencyHigh` fom high load during installation
# phase
if alert["labels"]["alertname"] == "KubeAPILatencyHigh":
if alert["labels"]["alertname"] == "KubeAPIDown":
return True
if 'pod' in alert["labels"]:
# Filter out failing Nextcloud installation jobs since a lot of
# them fail until they succeed during installation
if "nextcloud" in alert["labels"]["pod"]:
if alert["labels"]["alertname"] in [
"KubeJobFailed",
"KubeJobCompletion",
"KubePodNotReady"]:
return True
# Filter out when some apps take too long to start
if re.search("(rocketchat|wordpress)", alert["labels"]["pod"]):
if alert["labels"]["alertname"] in [
"KubePodNotReady",
"KubeDeploymentReplicasMismatch",
"KubeStatefulSetReplicasMismatch"]:
return True
# Filter out failed signgle-sign-on pods until we fix
# https://open.greenhost.net/openappstack/single-sign-on/issues/26
if "single-sign-on-create-" in alert["labels"]["pod"]:
if alert["labels"]["alertname"] in ["KubePodNotReady"]:
return True
if 'job_name' in alert["labels"]:
# Filter out failed signgle-sign-on jobs until we fix
# https://open.greenhost.net/openappstack/single-sign-on/issues/26
if "single-sign-on-create-" in alert["labels"]["job_name"]:
if alert["labels"]["alertname"] in [
"KubeJobFailed",
"KubeJobCompletion"]:
return True
return False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment