CASM-4908 Runtime container image signature validation #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary and Scope
During initial testing of image signature validation, it was discovered that Kyverno tries to contact https://artifactory.alogl60.net/ for image verification, and this blocks deployments in air-gapped environments, even in Audit mode (CASMTRIAGE-7283). We need to set Kyverno to contact local registry instead, for both images and their respective signatures. This will allow us to turn on signature validation in runtime (during initial deployments, upgrades and in background on running clusters).
Proposed solution involves these key steps:
prepend-registry
, which will automatically addregistry.local/
to the beginning of image spec for any new pod (if it doesn't already start withregistry.local/
).registry.local/
are looked inhttps://pit.nmn
first and inhttps://registry.local/
second. This rule is needed to support a switch from PIT Nexus to Cloud Nexus during initial install. It is similar to already existing rule for image names starting fromartifactory.algol60.net
, which now becomes obsolete.This change consists of the following PR's:
Issues and Related PRs
Testing
Tested on:
Test description:
validationFailureAction
set toAudit
andEnforce
.Risks and Mitigations
None known ATM.
Pull Request Checklist