Connectors CSI Driver
TOC
Overview
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
Now, we can create a Pod to mount the configuration from the ConnectorClass:
4. Configure Access Permissions
To allow the Pod to access the Connector's configuration, permissions must be granted to the Pod's ServiceAccount to read Connector resources:
Once the Pod is running, you can check the contents of the mounted configuration file with the following command:
Configuration Description
CSI Volume Configuration Parameters
volumeAttributes Parameters
Configuration Name Description
The configuration.names parameter must correspond to the configuration names defined in the ConnectorClass. For example:
Mounting a single configuration:
Mounting multiple configurations:
Note: If there are files with the same name in multiple configurations, the latter configuration will overwrite the former.
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.