Skip to content
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

Fix sidecar alerts #81

Merged
merged 1 commit into from
Apr 9, 2024
Merged
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
25 changes: 20 additions & 5 deletions common/stock/vault-clients.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,31 @@ groups:
been renewed. This may cause issues for the other containers in the pod.
summary: "The credentials for '{{ $labels.kubernetes_pod_name }}' have expired"
dashboard: https://grafana.$ENVIRONMENT.$PROVIDER.uw.systems/d/U61wpstMk/vault-credentials-sidecars
- alert: VaultSidecarMissing
expr: ((kube_pod_annotations{annotation_injector_tumblr_com_request=~"vault-sidecar-.+"} and on (pod,namespace) (kube_pod_status_scheduled{condition="true"} == 1)) unless on (pod,namespace) kube_pod_container_info{container=~"vault-credentials-agent.*"}) * on (namespace) group_left(team) uw_namespace_oncall_team
- alert: VaultSidecarMissingTumblr
expr: ((kube_pod_annotations{annotation_injector_tumblr_com_request=~"vault-sidecar-.+"} and on (pod,namespace) (kube_pod_status_scheduled{condition="true"} == 1)) unless on (pod,namespace) (kube_pod_init_container_info{container=~"vault-credentials-agent.*"} or kube_pod_container_info{container=~"vault-credentials-agent.*"})) * on (namespace) group_left(team) uw_namespace_oncall_team
for: 10m
labels:
alerttype: stock
alertgroup: vault_clients
annotations:
description: |
The pod is annotated with `{{ $labels.key }}={{ $labels.value }}` but does not have a
container matching the name `vault-credentials-agent.*`. This indicates an issue with
the sidecar injection. Check the `kube-system/k8s-sidecar-injector` deployment for problems.
The Pod is annotated with `{{ $labels.key }}={{ $labels.value }}`
but does not have a sidecar container matching the name
`vault-credentials-agent.*`. This indicates an issue with the
sidecar injection. Check the `kube-system/kyverno` for problems.
summary: "Vault sidecar is missing from {{ $labels.namespace }}/{{ $labels.pod }}"
dashboard: https://grafana.$ENVIRONMENT.$PROVIDER.uw.systems/d/U61wpstMk/vault-credentials-sidecars
- alert: VaultSidecarMissingUW
expr: ((kube_pod_annotations{annotation_uw_systems_kyverno_inject_sidecar_request=~"vault-sidecar-.+"} and on (pod,namespace) (kube_pod_status_scheduled{condition="true"} == 1)) unless on (pod,namespace) (kube_pod_init_container_info{container=~"vault-credentials-agent.*"} or kube_pod_container_info{container=~"vault-credentials-agent.*"})) * on (namespace) group_left(team) uw_namespace_oncall_team
for: 10m
labels:
alerttype: stock
alertgroup: vault_clients
annotations:
description: |
The Pod is annotated with `{{ $labels.key }}={{ $labels.value }}`
but does not have a sidecar container matching the name
`vault-credentials-agent.*`. This indicates an issue with the
sidecar injection. Check the `kube-system/kyverno` for problems.
summary: "Vault sidecar is missing from {{ $labels.namespace }}/{{ $labels.pod }}"
dashboard: https://grafana.$ENVIRONMENT.$PROVIDER.uw.systems/d/U61wpstMk/vault-credentials-sidecars