Skip to content
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

🏃 speed up e2e image builds #2660

Conversation

sethp-nr
Copy link
Contributor

What this PR does / why we need it:

Reduced repeat work on image builds, and shrinks the docker context that gets sent over the wire.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 12, 2020
Copy link
Member

@detiber detiber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor question related to one of the .dockerignore directives, otherwise lgtm

@@ -11,4 +11,7 @@ scripts/
tilt-settings.json
tilt.d/
Tiltfile
**/.tiltbuild
test/infrastructure/docker/e2e/logs/**
**/config/**/*.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't think we need anything under the config directory, or is this to prevent accidental inclusion of other directories that might be named config?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, maybe deserves a comment – the trouble is that setting the image pull strategy + arch modifies files under each manager's config directory.

So, when we do the next COPY . . it's a different tree, and the go build . runs again, once per manager.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the point I was attempting to make is that I don't think we need the config directory at all in the docker images, since it only contains generated yaml and not code to be compiled/run in the container.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly – it's not needed by any of the images, but it does bust the cache on each image build. Seemed like a worthy .dockerignore entry :)

@sethp-nr
Copy link
Contributor Author

/test pull-cluster-api-verify

Copy link
Contributor

@chuckha chuckha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great!

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chuckha, sethp-nr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 13, 2020
@chuckha
Copy link
Contributor

chuckha commented Mar 13, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 13, 2020
@k8s-ci-robot k8s-ci-robot merged commit f11383e into kubernetes-sigs:master Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants