Make sure NO_PROXY contains api endpoint

Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
pull/10046/head
Ling Samuel 2020-12-24 16:41:43 +08:00
parent 199ea3425b
commit e0178acecc
No known key found for this signature in database
GPG Key ID: 1405A670863B367F
1 changed files with 4 additions and 1 deletions

View File

@ -23,9 +23,12 @@ configure_proxy() {
# ensure all processes receive the proxy settings by default
# https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html
mkdir -p /etc/systemd/system.conf.d/
if [[ ! -z "${NO_PROXY-}" ]]; then
NO_PROXY="${NO_PROXY},control-plane.minikube.internal"
fi
cat <<EOF >/etc/systemd/system.conf.d/proxy-default-environment.conf
[Manager]
DefaultEnvironment="HTTP_PROXY=${HTTP_PROXY:-}" "HTTPS_PROXY=${HTTPS_PROXY:-}" "NO_PROXY=${NO_PROXY:-}"
DefaultEnvironment="HTTP_PROXY=${HTTP_PROXY:-}" "HTTPS_PROXY=${HTTPS_PROXY:-}" "NO_PROXY=${NO_PROXY:-"control-plane.minikube.internal"}"
EOF
}