Skip to content

Commit f7ef3cd

Browse files
authored
Fix sidecar alerts (#81)
- Include a separate alert for the UW flavoured annotation - Include initContainer metric as a possible way to run the sidecar
1 parent ce0ba41 commit f7ef3cd

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

common/stock/vault-clients.yaml.tmpl

+20-5
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,31 @@ groups:
1717
been renewed. This may cause issues for the other containers in the pod.
1818
summary: "The credentials for '{{ $labels.kubernetes_pod_name }}' have expired"
1919
dashboard: https://grafana.$ENVIRONMENT.$PROVIDER.uw.systems/d/U61wpstMk/vault-credentials-sidecars
20-
- alert: VaultSidecarMissing
21-
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
20+
- alert: VaultSidecarMissingTumblr
21+
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
2222
for: 10m
2323
labels:
2424
alerttype: stock
2525
alertgroup: vault_clients
2626
annotations:
2727
description: |
28-
The pod is annotated with `{{ $labels.key }}={{ $labels.value }}` but does not have a
29-
container matching the name `vault-credentials-agent.*`. This indicates an issue with
30-
the sidecar injection. Check the `kube-system/k8s-sidecar-injector` deployment for problems.
28+
The Pod is annotated with `{{ $labels.key }}={{ $labels.value }}`
29+
but does not have a sidecar container matching the name
30+
`vault-credentials-agent.*`. This indicates an issue with the
31+
sidecar injection. Check the `kube-system/kyverno` for problems.
32+
summary: "Vault sidecar is missing from {{ $labels.namespace }}/{{ $labels.pod }}"
33+
dashboard: https://grafana.$ENVIRONMENT.$PROVIDER.uw.systems/d/U61wpstMk/vault-credentials-sidecars
34+
- alert: VaultSidecarMissingUW
35+
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
36+
for: 10m
37+
labels:
38+
alerttype: stock
39+
alertgroup: vault_clients
40+
annotations:
41+
description: |
42+
The Pod is annotated with `{{ $labels.key }}={{ $labels.value }}`
43+
but does not have a sidecar container matching the name
44+
`vault-credentials-agent.*`. This indicates an issue with the
45+
sidecar injection. Check the `kube-system/kyverno` for problems.
3146
summary: "Vault sidecar is missing from {{ $labels.namespace }}/{{ $labels.pod }}"
3247
dashboard: https://grafana.$ENVIRONMENT.$PROVIDER.uw.systems/d/U61wpstMk/vault-credentials-sidecars

0 commit comments

Comments
 (0)