loki
loki copied to clipboard
feat:area/promtail: Added support to install wget on promtail docker image
What this PR does / why we need it: Users will now be able to make http request on the promtail API to do the healthcheck. Which issue(s) this PR fixes: Fixes #11590
Special notes for your reviewer:
Checklist
- [x] Reviewed the
CONTRIBUTING.mdguide (required) - [ ] Documentation added
- [ ] Tests updated
- [ ]
CHANGELOG.mdupdated- [ ] If the change is worth mentioning in the release notes, add
add-to-release-noteslabel
- [ ] If the change is worth mentioning in the release notes, add
- [ ] Changes that require user attention or interaction to upgrade are documented in
docs/sources/setup/upgrade/_index.md - [ ] For Helm chart changes bump the Helm chart version in
production/helm/loki/Chart.yamland updateproduction/helm/loki/CHANGELOG.mdandproduction/helm/loki/README.md. Example PR - [ ] If the change is deprecating or removing a configuration option, update the
deprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PR
Can you elaborate on what your end goal is here? It's not entirely clear to me. Promtail already serves all of it's endpoints on an HTTP port.
We also have some users asking for images with even less dependencies, like a scratch image with only our binaries. I think we're more likely to go towards that direction than installing more packages.
Can you elaborate on what your end goal is here? It's not entirely clear to me. Promtail already serves all of it's endpoints on an HTTP port.
@cstyan As you can see the issue https://github.com/grafana/loki/issues/11590 it says there @efficks wants to enable healthcheck on the grafana/promtail docker image but wget or curl is not installed on the image.
To verify the above I went on to check it on my system and found out wget is not installed in grafana/promtail docker image:
sheikhabubaker@DESKTOP-TFVM3PT:~$ docker pull grafana/promtail
Using default tag: latest
latest: Pulling from grafana/promtail
Digest: sha256:c9f886511f40d2cfce44fcbcf650d632c7c73b98a96ee15f4e72ed52e68e7cdc
Status: Image is up to date for grafana/promtail:latest
docker.io/grafana/promtail:latest
What's Next?
View a summary of image vulnerabilities and recommendations → docker scout quickview grafana/promtail
sheikhabubaker@DESKTOP-TFVM3PT:~$ docker run -it --rm --name promtail-cont --entrypoint /bin/sh grafana/promtail:latest
# wget --version
/bin/sh: 1: wget: not found
#
To install wget onto the grafana/promtail docker image I appended wget to package installing stage into Dockerfile.
I commented on the related issue, no response from the original issue reporter yet: https://github.com/grafana/loki/issues/11590#issuecomment-1906592368
@Sheikh-Abubaker okay, we can move forward with adding wget to the image. I'm not sure what's happened with the CLA check, you could try squashing all the commits into one but it might actually just be easiest to create a new branch locally off of main and force push to the branch this PR is open for.
@cstyan done!!
thanks for your patience @Sheikh-Abubaker
@cstyan you're welcome, thanks for your support too 😀!!