Skip to main content
SeccompProfile is a namespaced kguardian CRD that describes one seccomp profile file. You own the object; the Controller on every node renders spec to standard seccomp JSON at <kubeletRoot>/seccomp/kguardian/<namespace>/<name>.json and reports per-node state in status. See the distribution guide for the workflow and policy as code for why it is shaped this way.

Spec

The rendered node file is exactly { defaultAction, architectures?, syscalls[] } from spec, serialised deterministically. Nothing observed by kguardian is mixed in — what is on disk is what is in git.

Status

Written by the controllers only; you never set it.

Conditions

The summary (distribution, Ready) is computed by every controller from the CR’s own nodes list plus a live node count and applied with field manager kguardian-summary; every node computes the same value, so last-writer-wins converges. CaptureComplete, Drift and DenialsObserved come from the Broker and are applied the same way. Controllers only patch when a value changes. When the Broker cannot be reached at all, those three conditions and status.denials are left exactly as they were rather than flapping to Unknown — an outage is not an answer, and the CR should not start contradicting what it last knew because a scrape failed. On a CR that has never had a successful pass there is nothing to carry forward, so the three are absent from conditions entirely rather than present as Unknown. Anything selecting a condition by type has to handle it not being there.
observed: 0 and an absent denials block are opposite answers, and the difference is what gates promotion. 0 means kguardian checked and this workload’s profile has never fired. Absent means nobody checked — the Broker was unreachable, predates denial capture, or nothing in the cluster is capturing denials. Promoting a profile to an enforcing action on an absent block is promoting on no evidence at all.The rule to automate against: status.denials is present exactly when DenialsObserved is True or False, and absent exactly when it is Unknown. The block and the condition are two readings of one answer and never disagree, so gate on whichever is convenient — .status.denials.observed == 0 and DenialsObserved == False mean the same thing.
Denials are a different signal from Drift, which is inferred from observed syscalls rather than from the kernel’s verdict — see Denials vs Drift.

Printer columns

ACTION is spec.defaultAction, READY is status.distribution.summary, DRIFT is status.drift, DENIALS is status.denials.observed. The three DENIALS cells above are three different answers, readable without leaving the table. 17 — the kernel is acting on this profile. 0 — checked, and it has never fired, so media-transform is the one clear to promote. Blank — nothing is known, and batch-indexer is not a promotion candidate however good the rest of its row looks. A blank is never a quiet 0.

Delete semantics

Deleting a SeccompProfile deletes the file from every node on the next watch event. This is the only time kguardian removes anything from a node, and it follows your explicit deletion. A pod that still references the path fails its next start with CreateContainerError — remove the seccompProfile reference from the workload first, roll it, then delete the CR. Uninstalling the chart does not delete the CRD when seccomp.installCRDs is on: it is annotated helm.sh/resource-policy: keep, because dropping a CRD deletes every object of that kind with it. This CRD is rendered as a chart template rather than shipped in crds/ (as the older AuditNetworkPolicy CRDs are) so that helm upgrade can apply schema changes — Helm never upgrades anything under crds/. Delete it by hand (kubectl delete crd seccompprofiles.kguardian.dev) once you have removed every profile reference.

RBAC

With seccomp.distribute=true the chart grants the Controller’s ServiceAccount get/list/watch on seccompprofiles, patch on seccompprofiles/status, and list on nodes. Nothing is granted when distribution is off. Users need ordinary namespaced RBAC on seccompprofiles.kguardian.dev to create and edit profiles.