Skip to content
Snippets Groups Projects
Commit 9f6422a0 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Enable kubernetes api logging

parent 221d5122
No related branches found
No related tags found
1 merge request!30Enable kubernetes api logging
Pipeline #100260 passed
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
kubernetesVersion: v1.23.5
apiServer:
extraArgs:
oidc-issuer-url: "https://ticdesk.teckids.org/oauth"
oidc-client-id: "RcO3weOpSnlenZcBaBbXKFoNpElQzxjU0O20T273"
oidc-username-claim: "preferred_username"
audit-log-path: "/var/log/audit.log"
audit-policy-file: "/etc/kubernetes/manifests/custom/teckids-logging.yaml"
apiVersion: audit.k8s.io/v1
kind: Policy
omitStages:
- RequestReceived
rules:
# Log alle Requests für APIs mit deprecated Versionen. Leider kann man hier nicht
# auf die API-Version filtern, d.h. im Log werden auch aktuelle API-Versionen auftauchen.
- level: Metadata
resources:
# v1.25
- group: batch
resources: ["cronjobs"]
- group: autoscaling
resources: ["horizontalpodautoscalers"]
- group: policy
resources: ["poddisruptionbudgets", "podsecuritypolicies"]
# v1.26
- group: autoscaling
resources: ["horizontalpodautoscalers"]
- group: flowcontrol.apiserver.k8s.io
resources: ["flowschemas", "prioritylevelconfigurations"]
# v1.27
- group: storage.k8s.io
resources: ["csistoragecapacities"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment