The operator includes an optional validating admission webhook that intercepts DeploymentDocumentation Index
Fetch the complete documentation index at: https://dorguai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
CREATE and UPDATE operations. It runs the same validation checks as the controller but at admission time, before the change is persisted.
How it works
The webhook looks up the matching ApplicationPersona by the deployment’sapp.kubernetes.io/name label. If no label is present or no matching persona exists, the deployment is allowed without validation.
Modes
Advisory mode (default)
All deployments are allowed. Validation issues are returned as Kubernetes admission warnings, which appear inkubectl output:
Enforcing mode
Deployments with validation errors are denied. Warnings are still attached to allowed responses.Validation checks
The webhook runs four validation functions:| Check | Returns |
|---|---|
| Resource limits | warnings |
| Replica counts | warnings + errors |
| Security context | errors |
| Health probes | warnings |
| Check | Type | Condition |
|---|---|---|
| CPU limit exceeds persona | warning | Container CPU > persona CPU limit |
| Memory limit exceeds persona | warning | Container memory > persona memory limit |
| Below minimum replicas | error | Replicas < minReplicas |
| Above maximum replicas | warning | Replicas > maxReplicas |
runAsNonRoot not enforced | error | Persona requires it, pod doesn’t set it |
| Privilege escalation allowed | error | Persona forbids it, container allows it |
| Missing liveness probe | warning | Persona specifies livenessPath, no probe configured |
| Missing readiness probe | warning | Persona specifies readinessPath, no probe configured |
Enabling the webhook
Via Helm
Via CLI flag
TLS certificates
The webhook server requires TLS certificates. Options:- cert-manager (recommended) — The Helm chart supports cert-manager annotations for automatic certificate provisioning
- Manual certificates — Provide certificates via flags:
- Self-signed — controller-runtime generates self-signed certificates automatically for development
Fail-open behavior
The webhook is designed to fail open:- If the operator is down, Kubernetes skips the webhook (when configured with
failurePolicy: Ignore) - If the ApplicationPersona lookup fails (API error), the deployment is allowed with a log message
- If no
app.kubernetes.io/namelabel is present, the deployment is allowed without validation - If no matching persona exists, the deployment is allowed
Controller validation
Continuous validation via the reconciliation loop
Configuration
All webhook configuration options