The Pod Security Standards cover container privileges, but not supply-chain rules. Custom policies tie the cluster to roadmap step 1: only pinned images, no :latest, sane resource limits.
Enterprise practice: organisation-specific policies kept in git, tested in CI, deployed like any other code.
Policies as YAML files in the repo, deployed from 03-k8s-infra (audit mode):
disallow-latest-tag
require-image-digest (images must match *@sha256:*)
disallow-privileged-containers
require-run-as-nonroot
require-requests-limits
Add test cases (good and bad manifests) and run kyverno test in CI on every PR
Each policy has title, description and severity annotations
Tools
Kyverno, Kyverno CLI, Gitea Actions.
Done when
The policies are active in audit mode and appear in the policy reports
A PR with a broken policy fails kyverno test
Portfolio evidence
The policy files and test cases in the repo
Part of the security roadmap. Keep the evidence below for the write-up (README / blog post).
## Why
The Pod Security Standards cover container privileges, but not supply-chain rules. Custom policies tie the cluster to roadmap step 1: only pinned images, no `:latest`, sane resource limits.
**Enterprise practice:** organisation-specific policies kept in git, tested in CI, deployed like any other code.
Depends on kasun/homelab-infrastructure-as-code#83.
## Steps
- [ ] Policies as YAML files in the repo, deployed from `03-k8s-infra` (audit mode):
- [ ] `disallow-latest-tag`
- [ ] `require-image-digest` (images must match `*@sha256:*`)
- [ ] `disallow-privileged-containers`
- [ ] `require-run-as-nonroot`
- [ ] `require-requests-limits`
- [ ] Add test cases (good and bad manifests) and run `kyverno test` in CI on every PR
- [ ] Each policy has `title`, `description` and `severity` annotations
## Tools
Kyverno, Kyverno CLI, Gitea Actions.
## Done when
- The policies are active in audit mode and appear in the policy reports
- A PR with a broken policy fails `kyverno test`
## Portfolio evidence
- [ ] The policy files and test cases in the repo
---
_Part of the security roadmap. Keep the evidence below for the write-up (README / blog post)._
claude-botBot
added this to the Security Roadmap 2: Policy as code in Kubernetes milestone 2026-12-03 04:39:32 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
The Pod Security Standards cover container privileges, but not supply-chain rules. Custom policies tie the cluster to roadmap step 1: only pinned images, no
:latest, sane resource limits.Enterprise practice: organisation-specific policies kept in git, tested in CI, deployed like any other code.
Depends on kasun/homelab-infrastructure-as-code#83.
Steps
03-k8s-infra(audit mode):disallow-latest-tagrequire-image-digest(images must match*@sha256:*)disallow-privileged-containersrequire-run-as-nonrootrequire-requests-limitskyverno testin CI on every PRtitle,descriptionandseverityannotationsTools
Kyverno, Kyverno CLI, Gitea Actions.
Done when
kyverno testPortfolio evidence
Part of the security roadmap. Keep the evidence below for the write-up (README / blog post).