Connector
TOC
Overview
Connector is a namespace-level resource used to define the connection configuration between tools and platforms. It includes:
- Access address of the tool
- Authentication information of the tool
- Status information of the tool
For example, the following definition illustrates a Git type connector:
Connector Address
The address field specifies the target tool's URL endpoint that the Connector will integrate with. It accepts both root URLs and URLs with path prefixes.
Basic URL Format
For tools accessible at the root domain:
URL with Path Prefix
For tools deployed behind reverse proxies or accessible via specific paths:
Note: When a path prefix is specified, it becomes the default base path for all operations including authentication and liveness checks performed by this Connector.
Authentication Information
The authentication information defines the credentials for accessing the tool. Depending on the type of tool, different authentication methods can be configured. This authentication method is defined in the ConnectorClass. For more details, refer to the description of authentication information in ConnectorClass.
Configuring Authentication Information
Authentication information is configured in the following way:
- Specify the name of the authentication type used according to the ConnectorClass definition.
- Create a Secret that contains the credentials.
- Reference the Secret in the Connector via
spec.auth.secretRef. - Specify the parameter information required during authentication check.
For example, to configure basic authentication:
Optional Authentication
Some tools support access without authentication. In this case, spec.auth.secretRef can be omitted.
For example, accessing a public Git repository:
Authentication Check
The Connector supports verifying the validity of authentication information. The configuration for the check is set via spec.auth.params which includes the parameters required for the authentication check.
For example, to check access permissions to a Git repository:
Note that once the ConnectorClass specifies authentication detection params, parameters in connector must be provided, even if the Connector is created without specifying secret information, spec.auth.params must be passed.
Proxy Address
If the Connector points to a ConnectorClass that has configured proxy capability, the system will allocate a proxy address for each Connector.
Clients can use this proxy address to access the tool in a secretless manner.
The default format of the proxy address is http://c-{connector-name}.{namespace}.svc.cluster.local, which can be obtained from status.proxy.
For example, the following example describes a connector with a proxy address:
When the ConnectorClass has configured proxy resolver type is path, the format of the proxy address is http://c-{connector-name}.{namespace}.svc.cluster.local/namespaces/{namespace}/connectors/{connector-name}, where {path} is the path of the Connector.
For example, the following example describes a connector with a proxy address:
Status Information
The status information of the Connector is recorded in the status field, containing the following content:
ConnectorClassReady: Indicates whether the connector type is correct.SecretReady: Indicates whether the authentication information is correctly configured.LivenessReady: Indicates whether the tool is accessible.AuthReady: Indicates whether the authentication information is valid.ProxyServiceReady: Indicates whether the proxy address for the current Connector is successfully allocated.Ready: Indicates the overall status.
SecretReady Condition
Indicates the status information of the secret for the Connector.
AuthReady Condition
Indicates the status information of the authentication for the Connector.
LivenessReady Condition
Indicates the status information of the liveness for the Connector.
ProxyServiceReady Condition
Indicates the status information of the proxy service for the Connector.
For example:
For more information on conditions, please refer to Connector Conditions.