Skip to content

✨ Add wget to final image #3240

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

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Conversation

mjudeikis
Copy link
Contributor

Summary

When running kcp in docker and want to add simple heathchecks, this gets tricky. See the issue below. Dont want to add curl as its way too big, but wget should do just fine to achieve:

HEALTHCHECK --interval=30s \
            --timeout=5s \
            CMD ["/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "https://localhost:6443/health"]

GoogleContainerTools/distroless#183

Related issue(s)

Fixes #

Release Notes

add wget to final image

@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has signed the DCO. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 4, 2025
@mjudeikis mjudeikis changed the title :sparkles Add wget to final image ✨ Add wget to final image Jan 4, 2025
@embik
Copy link
Member

embik commented Jan 6, 2025

Have you tested this? Since the builder stage is docker.io/golang (which is based on Debian), I don't think the wget binary is statically linked, so it would miss dependencies when trying to run it in distroless.

@mjudeikis
Copy link
Contributor Author

I ran docker build locally and it worked. Did something changed recently? Gonna try again tomorrow

@embik
Copy link
Member

embik commented Jan 7, 2025

I ran docker build locally and it worked. Did something changed recently? Gonna try again tomorrow

docker build would work, but have you tested if the wget command in the resulting image is functional? 🤔

@mjudeikis
Copy link
Contributor Author

I ran docker build locally and it worked. Did something changed recently? Gonna try again tomorrow

docker build would work, but have you tested if the wget command in the resulting image is functional? 🤔

 => => naming to docker.io/library/test                                                                                       0.0s
~/go/src/github.com/kcp-dev/kcp mjudeikis/agg.wget 1m 8s ❯ docker run --entrypoint sh -it test                            15:57:23
/data $ wget google.com
Connecting to google.com (216.58.207.206:80)
Connecting to www.google.com (142.250.74.164:80)
saving to 'index.html'
index.html           100% |***********************************************************************************| 19284  0:00:00 ETA
'index.html' saved
/data $ 

🤷

Copy link
Member

@embik embik left a comment

Choose a reason for hiding this comment

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

/approve

Okay, then let's go! 🚀

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 7, 2025
@kcp-ci-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 35d27b4e13715a04cec3ad6105b0543647c3f9b6

@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: embik

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

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 7, 2025
@kcp-ci-bot kcp-ci-bot merged commit f136d4b into kcp-dev:main Jan 7, 2025
12 of 13 checks passed
@embik
Copy link
Member

embik commented Mar 17, 2025

/kind chore

@kcp-ci-bot
Copy link
Contributor

@embik: The label(s) kind/chore cannot be applied, because the repository doesn't have them.

In response to this:

/kind chore

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@embik
Copy link
Member

embik commented Mar 17, 2025

/kind cleanup

@kcp-ci-bot kcp-ci-bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Mar 17, 2025
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. dco-signoff: yes Indicates the PR's author has signed the DCO. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants