Skip to content

feat(gatekeeper-config): security policies#1707

Draft
mikolajkucinski wants to merge 7 commits into
mainfrom
feat/gatekeeper-config-security
Draft

feat(gatekeeper-config): security policies#1707
mikolajkucinski wants to merge 7 commits into
mainfrom
feat/gatekeeper-config-security

Conversation

@mikolajkucinski

Copy link
Copy Markdown
Contributor

Pull Request Details

Add security policies as the next batch of the gatekeeper-config migration.

Differences vs upstream:

Policy Upstream This PR
forbidden-clusterwide-objects Webhook names hardcoded in the chart; gated on cluster_type. allowedWebhooks is a Constraint parameter.
images-from-approved-registries images-from-non-keppel: denylist hardcoded to a single registry prefix. Renamed; allowedRegistries allowlist via startswith(image, prefix).
pci-forbidden-images Patterns hardcoded; container iteration iro.spec.containers[_] only matched Pods. patterns is a Constraint parameter; iterates via traversal.find_container_specs (handles all pod owners).
pod-required-labels pod-labels: hardcoded label key whose value is validated against a fixed whitelist. Renamed; requiredLabels is a list of label keys whose presence is enforced.
pod-security-v2 Allowlist hardcoded in the chart. allowlist is a Constraint parameter. Dropped 3 orphan top-level Rego rules (dead code).

Breaking Changes

None.

Issues Fixed

  • Partial progress on #1420

Other Relevant Information

None.

mikolajkucinski and others added 7 commits June 3, 2026 16:06
Add the gatekeeper-config PluginDefinition skeleton:
- chart structure,
- shared Rego libraries in _helpers.tpl
- plugindefinition with per-policy options pattern
- README
- CI workflow entry.
- high-cpu-requests, unmanaged-pods policies as a proof of the pattern

On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
- Expose policies.highCpuRequests.maxCpu as a configurable parameter
- Guard canonify_cpu string-parsing branches with is_string(orig)

On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
- cover add_support_labels and traversal libs plus the high-cpu-requests and unmanaged-pods policies
- install gator and run the suite on every PR touching gatekeeper-config/** via new workflow

On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
- add forbidden-clusterwide-objects, images-from-approved-registries, pci-forbidden-images, pod-required-labels, pod-security-v2
- bump chart and PluginDefinition to 0.2.0

On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant