Connector is a namespace-level resource used to define the connection configuration between tools and platforms. It includes:
For example, the following definition illustrates a Git type connector:
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.
For tools accessible at the root domain:
For tools deployed behind reverse proxies or accessible via specific paths:
Note
The http based authentication probe and liveness probe will not be performed against the path prefix. If you want to perform the probe against the path prefix, you can use authentication check expressions and liveness check expressions.
More about it please refer to liveness probe and authentication probe.
Connector parameters enable you to pass additional configuration information to a Connector instance. These parameters are first defined in the ConnectorClass specification and can then be configured when creating individual Connector resources.
You can specify parameter values in the Connector using the spec.params field.
spec.params[].name: The parameter name, which must match a parameter name defined in the corresponding ConnectorClass.spec.params[].value: The parameter value. The value type must match the parameter type defined in the ConnectorClass. Currently, only string type is supported.If a parameter has a default value defined in the ConnectorClass, you can omit the parameter when creating the Connector, and the default value will be used.
For more information about defining parameters in ConnectorClass, refer to ConnectorClass Parameters.
Example
The following example demonstrates a Connector configured with an sslVerify parameter:
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.
Authentication information is configured in the following way:
spec.auth.secretRef.For example, to configure basic authentication:
Some tools support access without authentication. In this case, spec.auth.secretRef can be omitted.
For example, accessing a public Git repository:
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.
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:
The status information of the Connector is recorded in the status field, containing proxy address, API address, and conditions:
status.conditions: Conditions of the Connector.status.proxy: Proxy address of the Connector.status.api: API address of the Connector.Proxy Address
The proxy field contains the proxy address of the Connector.
status.proxy.httpAddress.url: The HTTP address of the proxy for the current Connector.You can use this address with existing tool clients to access the tool in a secretless manner within the cluster. For more information, refer to Connector Proxy.
If the ConnectorClass has no proxy capability, the status.proxy field will be empty.
API Address
The api field contains the API address of the Connector.
status.api.path: The API relative path for the current Connector (relative to the cluster ingress access entrypoint).You can use this path outside the cluster to access the tool's original API through the current Connector. For more information, refer to Connector API.
Conditions
The conditions type includes:
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.
| Status | Reason | Description |
|---|---|---|
| True | SecretOptional | ConnectorClass marks authentication information as optional, and the current Connector has no authentication information configured |
| True | Secret is configured and exists | |
| False | Secret is configured, but an error occurred while checking if the Secret exists | |
| Unknown | Checking if the configured Secret is normal |
AuthReady Condition
Indicates the status information of the authentication for the Connector.
| Status | Reason | Description |
|---|---|---|
| True | NonAuthProbe | ConnectorClass does not specify Auth Probe information |
| True | Credential check is valid | |
| False | Credential check failed | |
| Unknown | Credential check in progress |
LivenessReady Condition
Indicates the status information of the liveness for the Connector.
| Status | Reason | Description |
|---|---|---|
| True | NonLivenessProbe | ConnectorClass does not specify Liveness Probe information |
| True | Tool access is normal | |
| False | Tool access is abnormal | |
| Unknown | Tool access check in progress |
ProxyServiceReady Condition
Indicates the status information of the proxy service for the Connector.
| Status | Reason | Description |
|---|---|---|
| True | NonProxy | ConnectorClass does not specify Proxy Service information, the current Connector does not have Proxy capability |
| True | Connector proxy service created successfully | |
| False | Proxy service is in an abnormal state | |
| Unknown | Proxy service check in progress |
For example: