OCI ConnectorClass
OCI ConnectorClass is a connector class used to define the OCI Connector. It allows users to easily access the OCI Registry (OCI image repository) within the cluster.
TOC
Access Requirements
The OCI Registry to be accessed must meet the following conditions:
-
Interface Implementation Requirements:
- Must implement at least the interfaces defined in the opencontainers/distribution-spec v1.0 specification.
- Must be able to pass the conformance test of the distribution-spec.
-
Authentication Method Requirements:
- Must implement Token-based authentication and comply with the CNCF Distribution Token Authentication Specification.
Quick Start
Parameter Constraints for Connector
spec.connectorClassName
Must use the constant value oci.
spec.address
Specifies the access address of the OCI Registry, for example: http://harbor.example.com.
spec.auth.name
Authentication types supported by the OCI Connector:
tokenAuth: Token-based authentication (optional)- Corresponding credential type:
cpaas.io/distribution-registry-token, this type of credential is used for the authentication process defined in the CNCF Distribution Token Authentication Specification, and the credential must provideusernameandpasswordinformation.
- Corresponding credential type:
For example:
If the target OCI Registry does not require authentication, the authentication information can be omitted. The configuration example is as follows:
spec.auth.params[]
Health check configuration:
repository: Specifies the image repository used for health checks, example: library/ubuntu.
Capability Description
Health Check
After creating the Connector, the system will perform the following operations:
- Perform health checks using the image repository specified by
spec.auth.params[name=repository]. - Store the check results in the
status.conditions[type=AuthReady]field.
Configuration Information
OCI ConnectorClass provides the following configurations:
docker-config: Docker configuration information.- Provides the
config.jsonconfiguration file. - Contains the authentication information required to access the proxy.
- Provides the
For example:
dockerd: Configuration information for the Docker Daemon. Adaemon.jsonconfiguration file will be provided, and by default, the Docker daemon configuration will set the current connector asinsecure-registries.
For example:
buildkitd: Configuration information for the BuildKit Daemon. Abuildkitd.tomlconfiguration file will be provided, and by default, the BuildKit daemon configuration will set the current connector asinsecure-registries.
For example:
You can mount this configuration information into Pods using connectors-csi, enabling keyless (Secretless) image pushing or pulling.
Proxy Information
After creating the Connector, the system will:
- Automatically create a Service for proxy purposes.
- Record the proxy address in the
status.proxy.httpAddressfield.
You can use this proxy address to perform image pushing and pulling operations.
For example: