Architecture Of Konflux

57. Pipeline Caching Feature Flag Configuration

Date: 2025-10-23

# Status

Implementable

# Context

Following the implementation of container build layer caching via Squid HTTP proxies as described in ADR 0047, we need to provide users with flexible control over when and how the proxy caching is enabled for their pipelines. Users need the ability to:

The current design requires users to manually configure HTTP_PROXY and NO_PROXY parameters to the buildah task, which exposes implementation details and creates a poor user experience. We need a more user-friendly configuration mechanism that abstracts away the technical details while providing appropriate levels of control.

# Decision

A enable-cache-proxy pipeline parameter will determine wither a particular pipeline uses the caching proxy or not.

A cluster-config config map in the konflux-info namespace will be defined. That config map will contain the http-proxy and no-proxy keys that will provide the configuration values needed by the pipeline to actually use the proxy. The config map will be defined to be globally readable from all namespaces in the cluster, but writable only by the infra team and the ArgoCD instance managing the cluster (if any). This is similar to other config maps that already reside in the konflux-info namespace.

The default behavior if the proxy is not explicitly enabled is to have it be disabled. If it is explicitly enabled but the necessary configuration values are missing from the cluster level config map, the system will fallback to hard-coded default values that assume the proxy is up and running.

To facilitate disabling use of the proxy throughout the cluster, a allow-cache-proxy flag will be defined in the cluster-config config map. Setting it to false will disable use of the proxy throughout the cluster.

# Implementation Details

# Rejected ideas

Originally this ADR proposed a per-namespace configuration level to override the pipeline configuration and be overridden by the cluster-level configuration. Following community discussion, this idea was rejected due to concerns of introducing unnecessary complexity.

# Consequences