This chart installs the upstream Kyverno admission controller and the Policy Reporter UI/metrics stack, and layers on a curated set of starter policies grouped into two categories:
Policies are designed to be introduced safely in Audit mode first and then flipped to enforce (e.g., Enforce) once workloads are compliant. This enables progressive hardening without breaking existing deployments.
Declared in Chart.yaml:
dependencies:
- name: kyverno
version: 3.3.9
repository: https://kyverno.github.io/kyverno/
- name: policy-reporter
alias: policyReporter
version: 3.1.3
condition: policyReporter.enabled
repository: https://kyverno.github.io/policy-reporter
kyverno: Core policy engine (CRDs + controllers)policy-reporter: Optional UI, metrics, and reporting integrations (enabled via policyReporter.enabled)| Group | File Path Prefix | Example Policies | Purpose |
|——-|——————|——————|———|
| Ops | templates/policies/ops/ | disallow-default-ns, disallow-latest-tag, specify-resources, disallow-nodeport-service | Enforce ops hygiene & resource governance |
| Security | templates/policies/security/ | restrict-image-registries, restrict-bind-to-cluster-admin, deny-secret-service-account-token, check-long-lived-secrets | Strengthen security posture & RBAC, reduce attack surface |
Each policy file is self‑contained (definition + any future exceptions/report tuning). Toggle a policy by setting its enabled: true/false in values.
Every policy exposes a mode value (in your values files) that maps to Kyverno failureAction:
Audit (non-blocking, generates policy reports; use for initial rollout)Enforce (blocking admission once confident)Recommended rollout:
mode: Audit in lower environments.mode to Enforce environment by environment.opsPolicies:
disallowDefaultNs:
enabled: true
mode: Audit
disallowLatestTag:
enabled: true
mode: Audit
specifyResources:
enabled: true
mode: Audit
disallowNodePortService:
enabled: true
mode: Audit
secPolicies:
restrictImageRegistries:
enabled: true
mode: Audit
restrictIngressDefaultBackend:
enabled: true
mode: Audit
restrictBindToSystemGroups:
enabled: true
mode: Audit
restrictBindToClusterAdmin:
enabled: true
mode: Audit
denySecretServiceAccountToken:
enabled: true
mode: Audit
checkLongLivedSecrets:
enabled: true
mode: Audit
Override per environment in values.<env>.yaml to progress policy maturity.
(Usually managed by the App‑of‑Apps root; direct install shown for reference.)
helm dependency update ./kyverno
helm upgrade --install kyverno ./kyverno -f kyverno/values.dev-01.yaml -n kyverno --create-namespace
If policyReporter.enabled=true the chart deploys Policy Reporter (+ UI & Kyverno plugin) in the Kyverno namespace with Prometheus scrape annotations for metrics and dashboards.
ops/ or security/); create a new YAML file.mode key in values.yaml for Audit/Enforce control.policies.kyverno.io/description).Kyverno supports PolicyExceptions (controller feature enabled). Prefer:
restrict-image-registries to lock down allowed registries; customize patterns before enforcing.specify-resources) helps with multi‑tenant fairness & scheduling stability.| Issue | Cause | Action |
|——-|——-|——–|
| Policy not applied | enabled: false or file conditional mismatch | Set enabled: true and resync |
| Workload blocked unexpectedly | Mode switched to Enforce prematurely | Revert to Audit, add exception, or fix manifest |
| High violation count | Existing workloads non‑compliant | Remediate manifests; stage Enforce after reduction |
| Missing reports | Policy Reporter disabled | Enable policyReporter.enabled=true |
To avoid label ownership conflicts with the Kyverno Helm chart, configure Argo CD to use a different instance label key than the default app.kubernetes.io/instance. Example global setting:
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
labels:
app.kubernetes.io/name: argocd-cm
app.kubernetes.io/part-of: argocd
data:
application.instanceLabelKey: argocd.argoproj.io/instance
Chart.yaml; bump deliberately for upstream changes.Internal use unless specified otherwise.