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

Switch to ghcr.io/distroless/busybox for shell-image #4762

Merged
merged 1 commit into from
Apr 15, 2022

Conversation

mattmoor
Copy link
Member

@mattmoor mattmoor commented Apr 14, 2022

This is very similar to #4758 and #4717 but for shell-image. This switches the default user of the shell-image to nonroot, which forces Tekton to be explicit about all of the places it needs a shell as root using runAsUser: 0.

This also switches things over to a much leaner busybox image (no glibc), which is the main thing we use base:debug for with the OG distroless images.

Fixes: #4761
Related: #4752

/kind cleanup

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in
    (if there are no user facing changes, use release note "NONE")

Release Notes

The default shell image is now nonroot by default, and much smaller.

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 14, 2022
@tekton-robot tekton-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 14, 2022
config/controller.yaml Outdated Show resolved Hide resolved
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 14, 2022
This is very similar to tektoncd#4758 and tektoncd#4717 but for `shell-image`.  This switches the default user of the `shell-image` to `nonroot`, which forces Tekton to be explicit about all of the places it needs a shell as `root` using `runAsUser: 0`.

This also switches things over to a much leaner `busybox` image (no `glibc`), which is the main thing we use `base:debug` for with the OG distroless images.

Fixes: tektoncd#4761
Related: tektoncd#4752
@mattmoor mattmoor changed the title [WIP] Switch to ghcr.io/distroless/busybox for shell-image Switch to ghcr.io/distroless/busybox for shell-image Apr 14, 2022
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 14, 2022
@mattmoor
Copy link
Member Author

/hold

I am optimistic this will now pass e2e testing, so removing the [WIP], but leaving a /hold on this to ensure folks have ample time to review this change.

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 14, 2022
@imjasonh
Copy link
Member

/lgtm

Thanks!

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 14, 2022
@mattmoor
Copy link
Member Author

/test pull-tekton-pipeline-alpha-integration-tests

Sidecar test flake 😞

@mattmoor
Copy link
Member Author

isolated-workspaces 🙄

/test pull-tekton-pipeline-alpha-integration-tests

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 15, 2022
@mattmoor
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

Going to run e2e once more with the nightly images

@mattmoor
Copy link
Member Author

Let's get it baking

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 15, 2022
@tekton-robot tekton-robot merged commit 88896b4 into tektoncd:main Apr 15, 2022
@mattmoor mattmoor deleted the shell-image-nonroot branch April 15, 2022 15:34
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

shell-image should specify to run as root when it needs it.
4 participants