Background
Fleet supports routing outbound traffic through an HTTP/HTTPS proxy via the standard HTTP_PROXY/HTTPS_PROXY environment variables. When the proxy itself uses a custom or private CA certificate (i.e. an HTTPS proxy with a self-signed or enterprise CA), Fleet's components need to trust that CA or all connections through the proxy will fail with a TLS verification error.
Currently there is no way to configure a custom CA cert for the proxy in Fleet.
Scope
The following components need to trust the proxy CA:
- gitjob-controller — fetches the latest commit from the git repo (polling).
- gitjob pod, init container (gitcloner) — clones
GitRepo.spec.repo using go-git.
- HelmOp controller — polls for the latest chart version via
bundlereader.ChartVersion. The HTTP transport (transportForAuth) uses x509.SystemCertPool() as the base but has no mechanism to inject the proxy CA separately from auth.CABundle (which is the chart repo's own CA).
This also applies to cloning over SSH through an HTTPS proxy (introduced in #3595): the proxy CA cert must be trusted when establishing the CONNECT tunnel to the proxy before the SSH connection is made.
The fleet apply main container and helm.chart downloads via go-getter are tracked separately in #4869.
Notes
SSL_CERT_FILE/SSL_CERT_DIR are not suitable for injecting an additional CA cert because they replace the system cert pool rather than appending to it, which would break TLS verification for public git hosts.
- The preferred approach is to pass the cert PEM via an environment variable and load it programmatically using
x509.SystemCertPool() + append, then pass the combined pool to go-git's HTTP transport.
Background
Fleet supports routing outbound traffic through an HTTP/HTTPS proxy via the standard
HTTP_PROXY/HTTPS_PROXYenvironment variables. When the proxy itself uses a custom or private CA certificate (i.e. an HTTPS proxy with a self-signed or enterprise CA), Fleet's components need to trust that CA or all connections through the proxy will fail with a TLS verification error.Currently there is no way to configure a custom CA cert for the proxy in Fleet.
Scope
The following components need to trust the proxy CA:
GitRepo.spec.repousing go-git.bundlereader.ChartVersion. The HTTP transport (transportForAuth) usesx509.SystemCertPool()as the base but has no mechanism to inject the proxy CA separately fromauth.CABundle(which is the chart repo's own CA).This also applies to cloning over SSH through an HTTPS proxy (introduced in #3595): the proxy CA cert must be trusted when establishing the CONNECT tunnel to the proxy before the SSH connection is made.
The
fleet applymain container andhelm.chartdownloads via go-getter are tracked separately in #4869.Notes
SSL_CERT_FILE/SSL_CERT_DIRare not suitable for injecting an additional CA cert because they replace the system cert pool rather than appending to it, which would break TLS verification for public git hosts.x509.SystemCertPool()+ append, then pass the combined pool to go-git's HTTP transport.