Skip to content

Instantly share code, notes, and snippets.

@akhan4u
Created August 20, 2025 11:49
Show Gist options
  • Save akhan4u/6d7cbb20a0c3bd50bc742364f18d662e to your computer and use it in GitHub Desktop.
Save akhan4u/6d7cbb20a0c3bd50bc742364f18d662e to your computer and use it in GitHub Desktop.
policy exception
apiVersion: kyverno.io/v2
kind: PolicyException
metadata:
name: toleration-exceptions
namespace: kube-system
spec:
background: true
match:
any:
- kinds:
- Pod
- Deployment
names:
- kube-system
exceptions:
- policyName: all-pods-need-tolerations
ruleNames:
- check-pod-tolerations
@akhan4u
Copy link
Author

akhan4u commented Oct 8, 2025

- apiVersion: monitoring.coreos.com/v1
  kind: ServiceMonitor
  metadata:
    labels:
      argocd.argoproj.io/instance: data-systems-airflow-dev
      mimir_matcher: datasystems-dev-airflow
      prom: local
    name: data-systems-airflow-dev-statsd-monitor
    namespace: data-systems-airflow-dev
  spec:
    endpoints:
    - interval: 10s
      metricRelabelings:
      - action: replace
        replacement: datasystems
        targetLabel: team
      - action: replace
        replacement: dev
        targetLabel: env
      - action: replace
        replacement: airflow
        targetLabel: group
      path: /metrics
      port: statsd-scrape
    namespaceSelector:
      matchNames:
      - data-systems-airflow-dev
    selector:
      matchLabels:
        component: statsd
        env: dev
        team: datasystems
        tier: airflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment