Connectors CSI Driver
TOC
OverviewQuick Start1. Create a ConnectorClass2. Create a Connector3. Create a Pod Using the CSI DriverBuilt-in ConfigurationsCSI Volume Parametersconfiguration.paramsFormatHow Defaults WorkAvailable Variables in TemplatesMultiple ConnectorsConfiguration MergingConfiguration File RenderingAvailable VariablesBuilt-in FunctionsAbout the Proxy ServiceConfiguration examplesNext StepsOverview
The Connectors CSI Driver is a storage driver implemented based on the Container Storage Interface (CSI) specification. It can mount configurations from the Connector as volumes into Kubernetes workloads. Key features include:
- Mounting configuration files from the Connector into Pods
- Supporting dynamic variable rendering in configuration files to automatically inject runtime information
- Supporting the simultaneous mounting of multiple configuration files
All configuration data comes from the ConnectorClass configuration associated with the Connector.
Use this document to understand how workloads mount Connector-rendered configuration and consume proxy-related runtime data.
This document focuses on mounting and rendering behavior. For proxy traffic and authentication, see Connectors Proxy. For permission gating and approval-triggered runtime access, see Connectors Approval & Permission Gating.
Quick Start
1. Create a ConnectorClass
First, create a ConnectorClass that includes Git configuration:
2. Create a Connector
Then, create a Connector that connects to GitHub:
3. Create a Pod Using the CSI Driver
Create a Pod that mounts the configuration:
Verify the mounted files:
Built-in Configurations
The CSI Driver automatically provides built-in configuration files that are always mounted into Pods.
Forward Proxy Usage:
Reverse Proxy Usage:
CSI Volume Parameters
Volume Parameters
Volume Attributes
Examples
Mount a single configuration:
Mount multiple configurations:
Mount multiple connectors for proxy authentication:
Notes:
- If
configuration.namesis omitted, only built-in configurations are mounted - When multiple configurations contain files with the same name, later configurations overwrite earlier ones
- The
connectorsparameter is used to specify multiple connectors for mount config.
configuration.params
configuration.params lets callers pass runtime parameters into configuration templates at mount time. Each configuration in a ConnectorClass can declare a set of named parameters; configuration.params supplies values for those parameters when creating the CSI volume.
Format
The value is a JSON object keyed by configuration name, where each value is an object of key-value pairs:
Example — passing mirrorRepository to the settings configuration and registry to the npmrc configuration in one mount:
Scoping by configuration name keeps parameters stable regardless of how many connectors are mounted or what they are named. Connector-specific values belong in Connector.spec.params, accessible in templates via .connectors[i].spec.params.
How Defaults Work
When a ConnectorClass configuration declares a parameter with a default value and the caller omits it, the CSI Driver injects the default automatically before rendering the template. No explicit value is required in configuration.params.
Example — strictSSL has a default of "true", so it can be omitted:
Available Variables in Templates
After processing, supplied (and defaulted) parameters are available in the configuration template as .configurations.<paramName>:
Multiple Connectors
The Connectors CSI Driver supports using multiple Connectors for configurations. You can specify multiple Connectors using the connectors volume attribute in the format namespace/name or name; if namespace is omitted, the Pod's namespace is used. Connectors should be separated by commas.
Before using multiple Connectors in one CSI volume, enable the enable-multi-connector feature flag in connectors-config. For details, see Feature Flags.
When multiple Connectors are specified, the CSI Driver merges configuration files based on the configuration.names attribute. The merging behavior is detailed in the Configuration Merging section.
There is no strict limit on how many connectors you may list; however, avoid specifying too many Connectors to prevent oversized request headers and other proxy-related issues.
Configuration Merging
When multiple Connectors are specified, the CSI Driver will merge the configuration files from all specified Connectors based on the configuration.names attribute.
There are several possible scenarios for processing configuration files; the cases below describe the behavior in each.
Same Configuration Name
For Connectors with the same configuration name, when multiple Connectors are specified, their configuration data will be merged into a single configuration file.
Configuration templates should support rendering data for multiple Connectors so a single file can incorporate multiple connector-specific data sets.
For example:
in the above example, the configuration file .multi-connector-config will include sections for each Connector specified in the connectors volume attribute.
If the merged connectors come from different ConnectorClasses and have configuration files with the same name, the configuration from the later ConnectorClass will override the configuration from the earlier ConnectorClass. Therefore, it is recommended to use different configuration file names in this scenario to avoid conflicts.
Different Configuration Names
When the specified Connectors have different configuration names, the CSI Driver will mount all configurations separately.
When mounting with both connectors and configuration names:
The mounted volume will contain both config.xml and settings.json, each populated with data from their respective Connectors.
Configuration File Rendering
The CSI Driver performs variable rendering when mounting configuration files, using Go template syntax.
Available Variables
Built-in Functions
Refer to sprig for supported functions
For example: b64enc: Base64 encoding of a string
About the Proxy Service
Connectors provide a proxy service for each Connector, allowing clients to access target resources without needing to store the original credentials. For more details, please refer to connectors-proxy.
Configuration examples
Constant content
Using connector.spec.params
The following ConnectorClass defines a parameter sslVerify to control the SSL verification during git clone.
Using proxy service and token
The following ConnectorClass provides a file named .gitconfig, which automatically injects headers and replaces the git URL during git clone by using the proxy service and token.