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

add curl to the dockerfile #662

Closed
survivant opened this issue Apr 8, 2021 · 2 comments
Closed

add curl to the dockerfile #662

survivant opened this issue Apr 8, 2021 · 2 comments
Labels
enhancement New feature or request ops Need a ops update (k8s, helm, docker)

Comments

@survivant
Copy link
Contributor

I had issues with the probes

 Warning  Unhealthy  2m16s (x6 over 3m36s)  kubelet            Liveness probe failed: dial tcp 192.168.158.111:8081: connect: connection refused
  Normal   Killing    2m16s (x2 over 3m16s)  kubelet            Container akhq failed liveness probe, will be restarted
  Warning  Unhealthy  2m12s (x8 over 3m42s)  kubelet            Readiness probe failed: Get "http://192.168.158.111:8081/health": dial tcp 192.168.158.111:8081: connect: connection refused

so I wanted to connect into the pod to try to call manually the URL so see what was the values returned, but wget and curl are not available in the dockerfile.

and we don't have root access, so I couldn't installed it.

for now, I just put in comments the probes and it works fine.

@tchiotludo
Copy link
Owner

Sound a nice addition, just drop a PR on the docker file and I will merge !
(just for information I change the probe endpoint port on last version, and the helm charts reflect this change, in case you are using an old akhq version)

@tchiotludo tchiotludo added enhancement New feature or request ops Need a ops update (k8s, helm, docker) labels Apr 8, 2021
@vutkin
Copy link

vutkin commented Jul 13, 2022

Hey @tchiotludo , this is very bad decision, curl adds a lot of vulnerabilities for free. It brings more problem than solves.

image

Thats just about curl, and there are a lot of dependencies that curl uses.

@survivant I advise you to modify pod and add another container with curl for debug purposes:

1. Add a sidecar container:
cat <<EOF > patch-file.yaml
spec:
  template:
    spec:
      shareProcessNamespace: true
      securityContext:
        runAsUser: 0
        fsGroup: 0
      containers:
      - name: akhq
      - name: debug
        image: alpine/curl
        command: ["/bin/sh"]
        args: ["-c", "tail -f /dev/null"]
        securityContext:
          capabilities:
            add:
            - SYS_PTRACE

kubectl patch deployment -connect --patch "$(cat patch-file.yaml)"

To summarise: you don't need curl in the image at all.

@tchiotludo tchiotludo moved this to Done in Backlog Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ops Need a ops update (k8s, helm, docker)
Projects
Status: Done
Development

No branches or pull requests

3 participants