-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix up image policy admission plugin #10384
Conversation
[test] |
SGTM API approved - will not have a chance to review before EOD. |
@mfojtik We need this in 3.3 ptal or reassign. |
// an objectref that is DockerImage ref will have a name that corresponds to its pull spec. We can parse that | ||
// to a docker image ref | ||
if ref != nil && ref.Kind == "DockerImage" { | ||
attrs.Name, _ = imageapi.ParseDockerImageReference(ref.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why dropping the errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why dropping the errors?
We won't return the error (resolution is optional) and if it doesn't understand it, it returns the best parse it can.
LGTM (do we have test coverage for the DockerImage case?) |
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7959/) (Image: devenv-rhel7_4839) |
Evaluated for origin test up to a40658d |
Evaluated for origin merge up to a40658d |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7958/) |
The failure you stumbled upon is different from the one in the linked issue. What you saw is that the deployer pod stopped at some point:
@mfojtik @smarterclayton not sure why we couldn't get all the logs from the deployer. It seems that the third deployment is completed successfully (and the deployer pod is deleted).
Is it possible that the deployer pod is deleted faster than reading all its log? |
Found these while trying to write up documentation and examples for the ImagePolicy admission plugin.
I think we should move resolve to a top level element that is an enum
Individual rules could have a
SkipOnResolutionFailure
which would allow a best effor attempt. It would be a validation error to choose DoNotAttempt with a policy rule that requires it.This would remove some of the craziness I faced when trying to match a registry name and having to say that I tolerated resolution failures.
@smarterclayton