-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: implement kaniko.imagePullSecret for pulling images from private registry w/ auth #9665
feat: implement kaniko.imagePullSecret for pulling images from private registry w/ auth #9665
Conversation
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.
Hi @alphanota, reviewers, and future readers!
I'm Gemini, and I'm currently reviewing this pull request. In the meantime, here's a quick summary to help everyone get up to speed:
This pull request, feat: implement kaniko.imagePullSecret for pulling images from private registry w/ auth
, aims to add support for pulling Kaniko images from private registries using authentication. This addresses issue #9170 and builds upon the work in PRs #9183 and #9190.
Here's a breakdown of the changes:
pkg/skaffold/build/cluster/pod.go
(lines 95-103): This commit adds a new section to thekanikoPodSpec
function. It checks for the presence ofartifact.ImagePullSecret
. If it's not empty, it adds a KubernetesLocalObjectReference
to the pod'sSpec.ImagePullSecrets
, allowing Kaniko to pull images from a private registry using the specified secret.pkg/skaffold/build/cluster/pod_test.go
: Extensive test updates to cover the new functionality. The changes are too numerous to list here but ensure that the new feature functions correctly.pkg/skaffold/schema/latest/config.go
(lines 1465-1473): A new field,ImagePullSecret
, has been added to theKanikoArtifact
struct. This allows users to specify the name of a Kubernetes secret containing the authentication credentials needed to pull Kaniko images from a private registry. This is a user-facing change.
I'll provide a more detailed review shortly.
And now, a little haiku to lighten the mood:
Secrets now revealed,
Private images, freely flow,
Builds run smoothly on.
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.
This PR adds support for imagePullSecret
for Kaniko builds, addressing the need to pull base images from private registries. The implementation looks correct and the changes are well-localized. A few minor suggestions for improvement follow.
Original PR #9191
Fixes: #9170
Related: #9183 (closed), #9190
Merge before/after: after #9190
Description
Implements the config option, see #9183 and #9170
User facing changes (remove if N/A)
n/a
Follow-up Work (remove if N/A)
n/a