You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
Pods in my environment don't have direct access to Internet resources, they have to use a proxy. So, for flux-helm-operator, the deployment manifest contains these environments variables:
Whenever I'm creating a HelmRelease object (using v0.5.0) specifying an external (github) GIT repository, those proxy env variables are not used:
---
apiVersion: flux.weave.works/v1beta1
kind: HelmRelease
metadata:
name: consul
namespace: cluster-tools
labels:
chart: consul
spec:
chart:
git: https://github.com/hashicorp/consul-helm.git
path: "/"
ref: "v0.3.0"
releaseName: consul
Logs from flux-helm-operator:
ts=2018-11-20T10:11:32.776998797Z caller=chartsync.go:243 component=chartsync info="Start of releasesync"
ts=2018-11-20T10:11:32.803799336Z caller=chartsync.go:318 component=chartsync info="chart repo not ready yet" releaseName=consul resource=cluster-tools:HelmRelease/consul status=new err="git clone --mirror: fatal: unable to access 'https://github.com/hashicorp/consul-helm.git/': Could not resolve host: github.com"
The Could not resolve host: github.com is an indicator that the proxy is not used since DNS resolution should not occur on the client side, but on the proxy. When I manually call git clone... from within the pod (using kubectl exec -ti ... sh), it works fine since environment variables are set.
Hi ! I was in the move to open a pull request with my changes for using an HTTP proxy when calling the git commands, but I can see I've waited for too long and you've already worked on it.
May I suggest to also include lowercase environment variables ? Not only HTTP_PROXY, HTTPS_PROXY and NO_PROXY are allowed, but also their lowercase counterparts: http_proxy, https_proxy, no_proxy.
Pods in my environment don't have direct access to Internet resources, they have to use a proxy. So, for
flux-helm-operator
, the deployment manifest contains these environments variables:Whenever I'm creating a HelmRelease object (using v0.5.0) specifying an external (github) GIT repository, those proxy env variables are not used:
Logs from
flux-helm-operator
:The
Could not resolve host: github.com
is an indicator that the proxy is not used since DNS resolution should not occur on the client side, but on the proxy. When I manually callgit clone...
from within the pod (usingkubectl exec -ti ... sh
), it works fine since environment variables are set.My guess is that the
git
command is launched within the operator without retrieving environment variables:https://github.com/weaveworks/flux/blob/8f09ae615bc9e12e34567d5bd6e1505998c1f608/git/operations.go#L268
Maybe something like
c.Env = os.Environ()
might work ?The text was updated successfully, but these errors were encountered: