pkgr isn't using http_proxy vars
Customer is trying to install a cluster that uses an http_proxy server to access the Internet. A pkgr is showing as failing with a timeout. The AKS (Azure Kubernetes Service) cluster is injecting the http_proxy variables into pods, but this is still not working.
The following errors are seen
$ kubectl get pkgr tanzu-standard -n tanzu-packages -o yaml
Fetching resources: Error
vendir: Error: Syncing directory '0':
Fetching image:
Error while preparing a transport to talk with the registry:
Unable to create round tripper:
On AKS (Azure Kubernetes Service) node and try a curl to that site, it works fine (so connectivity is not an issue):
# curl -v https://projects.registry.vmware.com
* Uses proxy env variable no_proxy =='xxx.xxx.xxx.xxx/16,xxx.xxx.xxx.xxx/24'
* Uses proxy env variable https_proxy == 'http://xxx.xxx.xxx.xxx:8888/'
* Trying xxx.xxx.xxx.xxx:8888...
* Connected to (nil) (xxx.xxx.xxx.xxx) port 8888 (#0)
* allocate connect buffer!
* Establish HTTP proxy tunnel to projects.registry.vmware.com:443
> CONNECT projects.registry.vmware.com:443 HTTP/1.1
> Host: projects.registry.vmware.com:443
> User-Agent: curl/7.81.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection established
<
You notice that when you ran the curl test from the AKS (Azure Kubernetes Service) node the no_proxy variable has lot of IP addresses and ports for proxy server compared to the environment variables for no_proxy variable in the yaml file from the output of $ kubectl get deployment kapp-controller -o yaml
Change the env: section of the output yaml file and no_proxy variable
env: - name: no_proxy
Once customer expanded the yaml file, so kapp-controller doesn't bypass the proxy, that resolved the customer's ssue