-
Notifications
You must be signed in to change notification settings - Fork 273
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(k8s): allow pulling base images when building in cluster #1374
Conversation
45ff2be
to
b7f0eb7
Compare
The current CI error appears related to #1373, so we should perhaps try and get that merged first. |
b7f0eb7
to
92bdeb0
Compare
Flagging as a refactor because this is mainly intended for internal usage for now, since changing the namespace might have some unintended consequences.
a87356f
to
3cf6c35
Compare
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.
Looks good! Noticed a typo but that's basically it. Want to try manually with gcr before approving.
docs/guides/in-cluster-building.md
Outdated
@@ -143,16 +143,30 @@ your own cron jobs. | |||
|
|||
## Pulling base images from private registries | |||
|
|||
Currently, only the _Local Docker_ build mode supports pulling base images from private registries in Dockerfiles. If you see an `ImagePullBackOff` error when using the other build modes, it's likely that it's failing because the Dockerfile for the module contains an entry like this: | |||
The in-cluster builder may need to be able to pull base images from a private registry, e.g. if your Dockerfile starts something like this: |
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.
with missing in if your Dockerfile starts something...
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.
Fixed
We now use the configured `imagePullSecrets` on the `kubernetes` provider to authenticate the cluster Docker daemon or Kaniko pods, so that you can pull base images from private repositories. This PR includes new integration tests and some helpers that were needed to facilitate those. Closes #1236
3cf6c35
to
e867903
Compare
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.
Worked with a private image on GCR. Approved!
What this PR does / why we need it:
We now use the configured
imagePullSecrets
on thekubernetes
provider to authenticate the cluster Docker daemon or Kaniko pods, so
that you can pull base images from private repositories.
This PR includes new integration tests and some helpers that were needed
to facilitate those.
Which issue(s) this PR fixes:
Closes #1236