-
Notifications
You must be signed in to change notification settings - Fork 4
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: image registries with no credentials but with a CA #927
base: main
Are you sure you want to change the base?
fix: image registries with no credentials but with a CA #927
Conversation
88f104f
to
794b055
Compare
|
68c0154
to
e3b4e0e
Compare
e3b4e0e
to
a7279d4
Compare
pkg/handlers/generic/mutation/imageregistries/credentials/inject.go
Outdated
Show resolved
Hide resolved
} | ||
} else { | ||
return false, fmt.Errorf("invalid image registry: %s: %w", config.URL, ErrCredentialsNotFound) | ||
if config.Mirror || config.HasCACert { |
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 not move this logic into requiresStaticCredentials
func now?
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.
I was looking into this some more and I don't really see a way to simplify.
We need to differentiate when requiresStaticCredentials
is true and when config.Mirror || config.HasCACert
vs nothing is set there.
Expect image registries with no credentials but with a CA to still work.
a7279d4
to
890d3f9
Compare
What problem does this PR solve?:
Passing
imageRegistries
with a CA but without credentials is still a valid configuration and should not error.Which issue(s) this PR fixes:
Fixes #
How Has This Been Tested?:
Special notes for your reviewer: