Skip to content

WIP: OCPBUGS-42087: Add an alert for watch cache readiness #1822

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions bindata/assets/alerts/kube-apiserver-watch-cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: kube-apiserver-watch-cache
namespace: openshift-kube-apiserver
spec:
groups:
- name: kube-apiserver-watch-cache
rules:
- alert: KubeAPIWatchCacheNotReady
annotations:
summary: "Watch cache for resource {{ $labels.resource }} is not ready."
description: "The watch cache for resource {{ $labels.resource }} has been in a non-ready state for more than 3 minutes."
expr: apiserver_watch_cache_ready == 0
for: 1m
labels:
namespace: openshift-kube-apiserver
severity: critical
1 change: 1 addition & 0 deletions pkg/operator/starter.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle
"assets/alerts/kube-apiserver-requests.yaml",
"assets/alerts/kube-apiserver-slos-basic.yaml",
"assets/alerts/podsecurity-violations.yaml",
"assets/alerts/kube-apiserver-watch-cache.yaml",
},
(&resourceapply.ClientHolder{}).
WithKubernetes(kubeClient).
Expand Down