Connectors CSI Driver
TOC
OverviewQuick Start1. Create a ConnectorClass2. Create a Connector3. Create a Pod Using the CSI DriverBuilt-in ConfigurationsCSI Volume ParametersConfiguration File RenderingAvailable VariablesBuilt-in FunctionsAbout the Proxy ServiceConfiguration examplesOverview
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.
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:
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
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.