Open FrancoisKlieberOrange opened 5 months ago
If we search for http.Client{
in the cpi-vcd 1.6.1 (https://github.com/vmware/cloud-provider-for-cloud-director/tree/1.6.z) code base, we will see that proxy setup is inconsistent during http client creation.
vcdsdk/client.go Method : RefreshBearerToken https://github.com/vmware/cloud-provider-for-cloud-director/blob/a0a0e916a5eda50705f9f3e3b7da8471bd6ff763/pkg/vcdsdk/client.go#L113 https://github.com/vmware/cloud-provider-for-cloud-director/blob/a0a0e916a5eda50705f9f3e3b7da8471bd6ff763/pkg/vcdsdk/client.go#L125
vcdsdk/client.go Method : NewVCDClientFromSecrets -> vcdsdk/auth.go Method : GetSwaggerClientFromSecrets https://github.com/vmware/cloud-provider-for-cloud-director/blob/a0a0e916a5eda50705f9f3e3b7da8471bd6ff763/pkg/vcdsdk/auth.go#L99
This will need a fix in cpi-vcd and then that fix needs to be consumed in capvcd
Describe the bug
It appears that not all calls made by
cluster-api-provider-cloud-director
are utilizing the proxy settings defined in the environment variables.Environment Details:
cluster-api-provider-cloud-director
has been updated withhttps_proxy
andno_proxy
environment variables.Here is the deployment configuration:
Issue Observed:
During the load balancer creation step, the request is being resolved by CoreDNS (10.96.0.10:53) instead of using the proxy. Below is the error message encountered:
Interestingly, other API calls are successful, such as token creation and determining which API version to use. These calls fail if the proxy is not set in the environment variables, indicating that some calls are respecting the proxy settings:
Additional Information:
Reproduction steps
https_proxy
andno_proxy
environment variables in thecluster-api-provider-cloud-director
deployment.Expected behavior
All API calls made by
cluster-api-provider-cloud-director
should utilize the proxy settings defined in the environment variables.Additional context
No response