KongZ / charts

Source for Helm chart repositories contribution
https://charts.kong-z.com/
Apache License 2.0
59 stars 65 forks source link

init container with support for https proxy #70

Open travisghansen opened 2 years ago

travisghansen commented 2 years ago

Describe the bug

When in an environment that requires an http/s proxy wget from the init container fails to download kubectl binary.

Connecting to 172.28.33.135:3128 (172.28.33.135:3128)
wget: error getting response
chmod: /k8s/kubectl: No such file or directory
/entrypoint.sh: line 10: /k8s/kubectl: No such file or directory
/entrypoint.sh: line 11: /k8s/kubectl: No such file or directory
Current master is 
Self IP is 
Launching graylog-0 as master
/entrypoint.sh: line 17: /k8s/kubectl: No such file or directory

https://gitlab.alpinelinux.org/alpine/aports/-/issues/10446

I've temporarily hacked another image which includes a 'real' version of wget but it's less than ideal for several reasons.

Any chance we can switch the default to another image that has a real version of wget already installed? Or use curl?

KongZ commented 2 years ago

yes, you can propose a new image with better wget than busybox and submit a PR. There is no particular reason to use busybox. It is just every small image. The busybox does not have curl so wget is using.

lkeijser commented 2 years ago

I've ran into the same issue, and what I did was create a small image based on Alpine, and (apk) add wget and curl:

FROM alpine
RUN apk add --update --no-cache curl ca-certificates wget && \
    rm -rf linux-amd64 && \
    rm -f /var/cache/apk/*

Then refer to this image in the values.yaml:

          init:
            image:
              repository: "myrepo/alpine-extended:latest"
            env:
              http_proxy: http://webproxy.my.corp:8080
              https_proxy: http://webproxy.my.corp:8080