Skip to content
Open
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
16 changes: 16 additions & 0 deletions falco/falco.yaml.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# PROMETHEUS RULES
# DO NOT REMOVE line above, used in `pre-commit` hook

groups:
- name: falco
# Based on https://stackoverflow.com/a/68718620
rules:
- alert: FalcoRuleViolation
expr: (sum(falco_events{} or falco_events{} * 0) by (k8s_pod_name, k8s_ns_name, priority, rule) - sum(falco_events{} offset 5m or falco_events{} * 0) by (k8s_pod_name, k8s_ns_name, priority, rule)) > 0
for: 1m
labels:
team: infra
annotations:
summary: Falco Rule Violation
impact: "Rule: {{ $labels.rule }} violation in {{ $labels.k8s_ns_name }}/{{ $labels.k8s_pod_name }}, priority: {{ $labels.priority }}"
action: For more information check https://falco-falcosidekick-ui.$ENVIRONMENT.$PROVIDER.uw.systems/events
10 changes: 10 additions & 0 deletions falco/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

configMapGenerator:
- files:
- falco.yaml.tmpl=falco.yaml.tmpl
name: alert-templates-falco

patches:
- path: volume.yaml
16 changes: 16 additions & 0 deletions falco/volume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: thanos-rule
spec:
template:
spec:
initContainers:
- name: render-alerts
volumeMounts:
- name: rule-templates-falco
mountPath: /var/thanos/rule-templates/falco
volumes:
- name: rule-templates-falco
configMap:
name: alert-templates-falco