Skip to content

Make CA bundle configurable for HTTPS_PROXY #4870

@p-se

Description

@p-se

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:

  1. gitjob-controller — fetches the latest commit from the git repo (polling).
  2. gitjob pod, init container (gitcloner) — clones GitRepo.spec.repo using go-git.
  3. 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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Needs QA review

Relationships

None yet

Development

No branches or pull requests

Issue actions