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

Simplify debian-base image builds #1909

Merged
merged 1 commit into from
Feb 12, 2021
Merged

Simplify debian-base image builds #1909

merged 1 commit into from
Feb 12, 2021

Conversation

saschagrunert
Copy link
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

The usage of a temp dir is not necessary if we use the
--build-arg/ARG syntax within the image build. We also do not have
to assume that we're running always on x86_64, which means that the
image build should now also work on arm machines for example.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

/hold for manual testing

We also have to do this change for the other images if it gets accepted.

Does this PR introduce a user-facing change?

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority area/release-eng Issues or PRs related to the Release Engineering subproject labels Feb 12, 2021
@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 12, 2021
@saschagrunert
Copy link
Member Author

saschagrunert commented Feb 12, 2021

Testing via:

> gcloud builds submit --verbosity info \
    --config images/build/debian-base/cloudbuild.yaml \
    --substitutions _CONFIG=buster,_IMAGE_VERSION=buster-v1.4.1,_GIT_TAG=v0.7.0-67-g62c01234 \
    --project k8s-staging-build-image \
    --gcs-log-dir gs://k8s-staging-build-image-gcb/logs \
    --gcs-source-staging-dir gs://k8s-staging-build-image-gcb/source

✔️ Works:
https://console.cloud.google.com/cloud-build/builds/a73cd194-3aa5-488a-864e-c023fad2056c?project=960211007710

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 12, 2021
@saschagrunert
Copy link
Member Author

Ready for review
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 12, 2021
@@ -27,6 +26,16 @@ COPY excludes /etc/dpkg/dpkg.cfg.d/excludes
# Convenience script for building on this base image.
COPY clean-install /usr/local/bin/clean-install
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use --chmod here, we were seeing some failures on s390x. See #1684 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

alternatively: Kubernetes fixed this upstream with umask 0022 in the build scripts and / or chmod on the host (one less layer / don't need to run it N times for each image).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I decided to add a RUN chmod +x /usr/local/bin/clean-install to stay a bit more backwards compatible. WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Set the umask in the Makefile now, this should address the issue.

The usage of a temp dir is not necessary if we use the
`--build-arg`/`ARG` syntax within the image build. We also do not have
to assume that we're running always on x86_64, which means that the
image build should now also work on arm machines for example.

Signed-off-by: Sascha Grunert <mail@saschagrunert.de>
@justaugustus
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus, saschagrunert

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 merged commit 19f5fed into kubernetes:master Feb 12, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Feb 12, 2021
@saschagrunert saschagrunert deleted the debian-base-simplify branch February 12, 2021 15:04
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. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note-none Denotes a PR that doesn't merit a release note. sig/release Categorizes an issue or PR as relevant to SIG Release. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants