SeccompProfile is a namespaced kguardian CRD that describes one seccomp
profile file. You own the object; the kguardian 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 and Drift come from the broker’s observed set
and are applied the same way. Controllers only patch when a value changes.
Printer columns
ACTION is spec.defaultAction, READY is status.distribution.summary,
DRIFT is status.drift.
Delete semantics
Deleting aSeccompProfile 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
Withseccomp.distribute=true the chart grants the controller 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.