ResourceInterface

Overview

ResourceInterface is a cluster-level resource that defines standardized abstractions for external resources (like Git repositories, OCI artifacts, Maven artifacts) and how they integrate into pipeline workflows. It serves as a bridge between connectors and pipeline orchestration, enabling seamless resource integration with minimal manual configuration.

The following example defines a GitCodeRepository interface that describes Git repository access:

apiVersion: connectors.alauda.io/v1alpha1
kind: ResourceInterface
metadata:
  name: gitcoderepository
  labels:
    resourceinterface.connectors.cpaas.io/category: "GitCodeRepository"
spec:
  params:
  - name: repository
    type: string
    description: "Repository name"
  - name: revision
    type: string
    default: "refs/heads/main"
    description: "Git revision (branch, tag, or commit)"
  attributes:
  - name: url
    type: string
    expression: "{connector.spec.address + '/' + params.repository}"
    parameterize:
      name: git-url
    dependsOn:
    - params.repository
    - connector
  workspaces:
  - name: git-basic-auth
    workspaceMapping:
      name: git-basic-auth
    value:
      csi:
        driver: connectors-csi
        readOnly: true
        volumeAttributes:
          connector.name: "{connector.metadata.name}"
          connector.namespace: "{connector.metadata.namespace}"
          configuration.names: "gitconfig"
          token.expiration: 30m

ResourceInterface defines the following key aspects for resource integration:

  • Input parameters required for resource configuration
  • Output attributes calculated from parameters and connector information
  • Workspace definitions for volumes and credentials

This document provides ResourceInterface Data Structure definition and Examples to help readers understand how to customize ResourceInterface.

You don't need to understand the details of ResourceInterface unless you want to customize ResourceInterface.

Problem It Solves

When building CI/CD pipelines, users traditionally face several challenges:

Manual Resource Entry: Users cannot easily browse and add external resources like Git repositories, OCI repositories, and other external services. They must manually enter URLs and set up workspaces, which is error-prone and time-consuming.

Repetitive Execution Configuration: Every time users run a pipeline, they must manually enter version details like Git revision and target OCI tag, and repeatedly configure workspaces.

Split Attributes: Attributes from the same remote resource are often split into different parameters. For example, the git-clone task requires separate url and revision parameters, plus workspace configurations for credentials and source code.

Complex Workspace Selection: The pipeline workspace selection process lists all available options but provides little guidance on which connector type is appropriate for each workspace.

ResourceInterface addresses these issues by providing a standardized way to describe and integrate external resources into pipeline workflows, enabling users to browse and select resources through UI interfaces while automatically generating the correct configuration and credentials.

Data Structure

ResourceInterface is a cluster-level k8s resource

  • Kind: ResourceInterface
  • API Version: connectors.alauda.io/v1alpha1

Human-Readable information

ResourceInterface is a standard k8s resource, it can be annotated with human-readable information using annotations.

KeyPositionDescription
cpaas.io/display-nameannotationsDisplay name for ResourceInterface, optional.
cpaas.io/descriptionannotationsDescription for ResourceInterface, optional.
apiVersion: connectors.alauda.io/v1alpha1
kind: ResourceInterface
metadata:
  name: gitcoderepository
  annotations:
    cpaas.io/display-name: "Git Code Repository"
    cpaas.io/description: "GitCodeRepository is a resource interface for Git code repository"

you can also use style.tekton.dev/descriptors annotation to describe the params for dynamic form.

metadata:
  annotations:
    style.tekton.dev/descriptors: |-
      - path: params.revision
        x-descriptors:
          - urn:alm:descriptor:widgets:select
          - urn:alm:descriptor:expression:props.options:schema:openapi:context.connectorClass.spec.api.openapi:listGitRefs

more details please refer to dynamic-form.

Resource Categories

ResourceInterface organizes resources into categories that define common contracts and behaviors. Categories are marked using the label resourceinterface.connectors.cpaas.io/category.

metadata:
  labels:
    resourceinterface.connectors.cpaas.io/category: "GitCodeRepository"

Multiple ResourceInterfaces can belong to the same category (e.g., gitcoderepository and githubcoderepository both belong to the GitCodeRepository category). Resources in the same category must provide the same standard attributes and workspaces to ensure compatibility.

Parameters

Parameters define the input data required to configure the resource when integrated into a pipeline. These parameters influence the calculation of output attributes.

Parameters are defined in spec.params and follow Tekton parameter types:

  • name: Parameter name
  • type: Supports string, array, object (consistent with Tekton ParamSpec types)
  • default: Default parameter value (optional)
  • description: Parameter description for UI display (optional)

for example:

kind: ResourceInterface
metadata:
  name: gitcoderepository
  labels:
    resourceinterface.connectors.cpaas.io/category: "GitCodeRepository"
spec:
  params:
  - name: repository
    type: string
    description: "Repository name"
  - name: revision
    type: string
    default: "refs/heads/main"
    description: "Git revision (branch, tag, or commit)"

Attributes

Attributes define the output values calculated from input parameters and connector information. They can be consumed by pipeline tasks as parameters and may be elevated to pipeline-level parameters.

Attributes are defined in spec.attributes:

  • name: Attribute name
  • type: Value type - supports string, array
  • expression: JavaScript expression for calculating the attribute value
  • parameterize: Parameterization configuration
    • name: Default parameter name when parameterized
    • disable: Whether to disable parameterization
  • dependsOn: Dependencies on parameters or connector

for example:

spec:
  attributes:
  - name: url
    type: string
    expression: "{connector.spec.address + '/' + params.repository}"
    parameterize:
      name: git-url
    dependsOn:
    - params.repository
    - connector
  - name: artifact-versions
    type: array
    expression: "{params.tags.map(tag => connector.spec.registry + '/' + params.repository + ':' + tag)}"
    dependsOn:
    - params.repository
    - params.tags
    - connector

Expression Syntax

Expressions use JavaScript syntax and support:

  • String concatenation: params.organization + '/' + params.repository
  • Object property access: connector.metadata.name
  • Array operations: params.tags.map(tag => connector.spec.address + ':' + tag)
  • Built-in functions:
    • url(connector.spec.address).host: get the host of the address
    • selectedConnectors(): the primary Connector plus any extra Connectors selected in the Integration, for the CSI connectors volume attribute. See Multiple Connectors.
    • selectedConfigurationNames('<baseNames>'): the workspace's base configuration.names plus the configurations required by cross-type extra Connectors. Requires schema-version 3, which is supported by Tekton operator v4.14.0 and later. See Multiple Connectors.

and other JavaScript syntaxes are supported.

Available Context:

  • connector: Current connector information, the structure of connector please refer to Concept of Connector
  • params: Current parameter values

the context data structure is:

{
  "params": {
    "param-name1": "param-value",
    "param-name2": "param-value"
  },
  "connector": {}
}

Security: Frontend executes JavaScript code in a sandbox environment, allowing only safe, sandboxed functions.

Example:

  • {connector.spec.address + '/' + params.repository}: get the address of the repository
  • {url(connector.spec.address).host + '/' + params.repository + ':' + params.tag}: get the address of the artifact
  • {params.tags.map(tag => url(connector.spec.address).host + '/' + params.repository + ':' + tag)}: get the addresses of the artifacts array by iterating the tags array

Dependencies

Dependencies specify what parameters or connector information an attribute calculation depends on:

  • params.<param-name>: Depends on a specific parameter value
  • connector: Depends on connector selection

Workspaces

Workspaces define volumes and credentials provided by the resource interface. They enable automatic provisioning of required resources for pipeline tasks.

Workspaces are defined in spec.workspaces:

  • name: Workspace name
  • workspaceMapping.name: Default workspace name when added to pipeline workspaces
  • value: Default workspace value (follows Tekton WorkspaceBinding format), consistent with Tekton WorkspaceBinding types

for example:

spec:
  workspaces:
  - name: git-source
    workspaceMapping:
      name: git-source
    value:
      volumeClaimTemplate:
        spec:
          accessModes: [ReadWriteMany]
          resources:
            requests:
              storage: 1Gi
  - name: git-basic-auth
    workspaceMapping:
      name: git-basic-auth
    value:
      csi:
        driver: connectors-csi
        readOnly: true
        volumeAttributes:
          connector.name: "{connector.metadata.name}"
          connector.namespace: "{connector.metadata.namespace}"
          configuration.names: "gitconfig"
          token.expiration: 30m

Workspace values support expressions to dynamically reference parameter and connector values using the same syntax as attributes.

Configurations

spec.configurations holds optional, ResourceInterface-wide settings that the Pipeline Integration UI reads when users create an Integration. Today it carries one entry, multipleMergeConnectors.

Multiple Connectors

spec.configurations.multipleMergeConnectors lets one Pipeline Integration use more than one Connector: a primary Connector plus extra Connectors. In every workspace that lists the selected Connectors with selectedConnectors(), the Connectors CSI Driver merges their credentials and configuration files into that workspace. Workspaces that only reference the primary Connector (connector.name / connector.namespace without connectors) keep using the primary Connector alone. For example, the deprecated docker-credentials workspace of the OCI artifact ResourceInterfaces works this way.

FieldDefaultDescription
enabledfalseAllows selecting extra Connectors in addition to the primary Connector. Without allowCrossTypeConnectors, extra Connectors must be of the same type, that is, compatible with this ResourceInterface.
allowCrossTypeConnectorsfalseOnly takes effect when enabled is true. Also allows extra Connectors whose ConnectorClass is not compatible with this ResourceInterface (other types). For example, an OCI artifact Integration can also use a Maven Connector.
description—Help text shown for the extra Connectors selector.
spec:
  configurations:
    multipleMergeConnectors:
      enabled: true
      allowCrossTypeConnectors: true
      description: Multiple connectors can be selected, including connectors of other types (e.g. Maven).

Mounting several Connectors in one CSI volume requires the enable-multi-connector feature flag. In the UI, the extra Connectors selector is shown only when both the flag and enabled are on.

Workspaces that should receive the extra Connectors list them with selectedConnectors() in the CSI connectors volume attribute:

spec:
  workspaces:
  - name: registry-config
    value:
      csi:
        driver: connectors-csi
        readOnly: true
        volumeAttributes:
          connector.name: "{connector.metadata.name}"
          connector.namespace: "{connector.metadata.namespace}"
          connectors: "{selectedConnectors()}"
          configuration.names: "{selectedConfigurationNames('registry-config,!ca.cert')}"
          token.expiration: 30m

Cross-type configuration names. An extra Connector of another type needs its own configuration files, for example a Maven Connector needs settings. A fixed configuration.names list cannot know about them in advance. So when allowCrossTypeConnectors is true, every workspace that uses selectedConnectors() should build configuration.names with selectedConfigurationNames(baseNames):

  • baseNames is the workspace's own rule for the primary type, using the same syntax as configuration.names: configuration names plus optional !<fileName> exclusions.
  • For each extra Connector of another type, the function adds every configuration name declared by that Connector's ConnectorClass (spec.configurations[].name). Each ConnectorClass is expanded once.
  • Extra Connectors of the same type add nothing. Only the configurations named in baseNames are mounted for them.
  • The result is ordered as base names, then cross-type names, then the ! exclusions from baseNames, with duplicates removed.
  • Exclusions come only from the primary ResourceInterface's baseNames. For example, !ca.cert in an OCI or Harbor workspace also applies when a Maven Connector is added. A Maven ResourceInterface that does not exclude ca.cert keeps the file when an OCI Connector is added.
  • If an extra Connector or its ConnectorClass cannot be read while the UI evaluates the expression, that Connector adds no configuration names and the expression itself does not fail. This tolerance applies only to computing configuration.names. When the Pod starts, the CSI Driver must read every Connector listed in connectors, and the volume mount fails if any of them cannot be read.

For example, with the base registry-config,!ca.cert and an extra Maven Connector whose ConnectorClass declares settings, the workspace mounts registry-config,settings,!ca.cert.

selectedConfigurationNames is a schema-version 3 expression, so cross-type ResourceInterfaces must carry resourceinterface.connectors.cpaas.io/schema-version: "3" (see Schema Version and Tekton Compatibility). The operator keeps the earlier same-type ResourceInterfaces installed next to them for older frontends.

Version requirements for cross-type Multiple Connectors:

ComponentMinimum versionWhy
Alauda Container Platform Connectors operatorv1.15.0Ships the allowCrossTypeConnectors field and the schema-version 3 ResourceInterfaces listed below.
Tekton operatorv4.14.0Its Pipeline UI is the first to support schema-version 3: selectedConfigurationNames, the extra Connectors grouping, and the cross-type hint.

On older Tekton releases, behavior depends on whether the release understands schema-version:

  • Recognizes schema-version but supports a version below 3: the UI skips the version 3 ResourceInterfaces and picks the earlier ResourceInterface of the category, so extra Connectors stay limited to the same type. No action is needed.
  • Predates schema-version support: the UI treats the version 3 ResourceInterfaces as renderable, and their Integration forms break. Cap the installed schema-versions with the pipeline-integration install flag ("<=2"), or upgrade Tekton. See Upgrade the Tekton operator and Cap the installed schema-version range.

The following ResourceInterfaces ship with cross-type Multiple Connectors enabled:

ResourceInterfaceConnectorClassCategoryschema-version
ociartifact-v2ociOCIArtifact3
harborociartifact-v3harborOCIArtifact3
jfrogociartifact-v2jfrogOCIArtifact3
mavenrepository-v2mavenMavenRepository3

ConnectorClass

ConnectorClasses mark supported ResourceInterfaces through labels resourceinterface.connectors.cpaas.io/<resource-interface-name>: "true", for example:

metadata:
  labels:
    resourceinterface.connectors.cpaas.io/gitcoderepository: "true"
    resourceinterface.connectors.cpaas.io/githubcoderepository: "true"

This enables the system to match compatible connectors with ResourceInterfaces and provide appropriate parameter forms based on ResourceInterface definitions.

More about ConnectorClass please refer to Concept of ConnectorClass

Schema Version and Tekton Compatibility

A ResourceInterface carries two version-related labels that serve distinct purposes:

LabelPurpose
resourceinterface.connectors.cpaas.io/versionMarks successive generations of the same RI object (for example gitcoderepository-v1 and gitcoderepository-v2 may coexist on the cluster). Today this label is only used to disambiguate object names — no controller or runtime path consumes it yet.
resourceinterface.connectors.cpaas.io/schema-versionDeclares the frontend rendering capability this RI requires (sandbox functions, form widgets, expression syntax). The DevOps UI declares its own currentSchema and silently skips any RI whose schema-version exceeds it.

Both default to "1" when omitted. The remainder of this section covers the schema-version dimension, which is where Tekton compatibility surfaces.

Compatibility With Tekton Releases

On a Tekton release that recognizes the schema-version label, the DevOps frontend automatically picks, for each category, the highest ResourceInterface whose schema-version is at or below its own supported level. No operator configuration is needed — mixed-schema deployments work out of the box.

On an older Tekton release that predates schema-version support, the frontend treats every installed ResourceInterface as renderable. When the only ResourceInterface for a category has schema-version > 1, selecting a Connector produces a broken or empty integration form — the frontend cannot resolve the higher-schema expressions, workspace configuration, or form widgets.

Recovering From the Broken-Form Symptom

If you hit the broken-form symptom described above on an older Tekton release, two recovery paths are available — in order of preference:

Preferred: Upgrade the Tekton operator

Upgrade your Tekton release to a version that recognizes the schema-version label. This is the root fix:

  • The DevOps frontend will then transparently pick the highest ResourceInterface its own currentSchema supports and silently skip anything beyond it; the broken-form symptom disappears without any Connectors-operator configuration.
  • ConnectorsConfig.spec.installFlags stays empty (its default), so every shipped ResourceInterface remains installed and available the moment Tekton can render it.
  • No technical debt is introduced — you don't have to remember to revert an emergency override later.

If upgrading Tekton is feasible in your environment, prefer this path and you can stop here.

Fallback: Cap the installed schema-version range

If you cannot upgrade Tekton yet, cap which schema-versions install on the cluster-singleton ConnectorsConfig:

apiVersion: operator.connectors.alauda.io/v1alpha1
kind: ConnectorsConfig
metadata:
  name: connectors-config
spec:
  installFlags:
    pipeline-integration: "<=2"   # install schema-version 1 and 2; skip 3+

Higher-schema ResourceInterfaces are removed from the cluster; categories fall back to the version your Tekton can render. After Tekton is upgraded, raise the cap (e.g. "<=3") or remove the entry to re-install them.

For the complete ConnectorsConfig reference, see Installation → ConnectorsConfig.

Dynamic Form

Dynamic forms provide a declarative way to configure interactive UI components for Pipeline Integration. With dynamic forms, users can browse and select resources such as Git repositories and revisions directly through the connector.

Overview

Use the style.tekton.dev/descriptors annotation to define dynamic form behavior for parameters. Here is an example:

metadata:
  annotations:
    style.tekton.dev/descriptors: >-
      - path: params.repository
        x-descriptors:
          - urn:alm:descriptor:com.tectonic.ui:select:repository
          - urn:alm:descriptor:expression:props.options:api:/clusters-rewrite/${context.cluster}${context.connector.status.api.path}/api/v4/projects?simple=true
          - urn:alm:descriptor:expression:props.options:label:path:path_with_namespace
          - urn:alm:descriptor:expression:props.options:value:path:path_with_namespace
          - urn:alm:descriptor:label:en:Repository
          - urn:alm:descriptor:label:zh:Repository
          - urn:alm:descriptor:description:zh:Repository path including group name or username, e.g. mygroup/my-app.
          - urn:alm:descriptor:description:en:Repository path including group name or username, e.g. mygroup/my-app.

The syntax follows the Pipeline Dynamic Forms specification. Familiarity with that documentation is recommended before proceeding.

In addition to the standard capabilities, dynamic forms in ResourceInterface support:

  • Extended context variables for accessing connector and ResourceInterface data
  • Reference OpenAPI display schema definitions in ConnectorClass for centralized API configuration and reference the api definition when using dynamic form

Extended Context Variables

The following context variables are available in ResourceInterface dynamic forms:

VariableDescription
context.connectorThe Connector object. Access any field, e.g., context.connector.status.api.path
context.connectorClassThe ConnectorClass object. Access any field, e.g., context.connectorClass.spec.api.openapi
context.paramsParameter values in Pipeline Integration UI form, e.g., context.params.repository
context.resourceInterfaceThe ResourceInterface object. Access any field as needed

Dynamic Form Configuration Approaches

There are two approaches to configure dynamic forms in ResourceInterface:

  1. Direct API Configuration: Call connector APIs directly using descriptor expressions. This approach is straightforward and easy to understand. The Connectors System provides Connector API endpoints for listing repositories, git references, and more.

  2. Reference OpenAPI Display Schema in ConnectorClass: Define API calls and display mappings in the ConnectorClass using spec.api.openapi. This approach centralizes API definitions and display configurations, avoiding duplication across multiple ResourceInterfaces. When using dynamic form, you can reference the API definition in the ConnectorClass directly.

You can use either approach independently or combine them as needed.

Direct API Configuration

Example: Listing GitLab Repositories

GitLab connectors expose the native GitLab API, which can be used to populate a repository selector:

kind: ResourceInterface
metadata:
  name: gitlabcoderepository
  annotations:
    style.tekton.dev/descriptors: >-
      - path: params.repository
        x-descriptors:
          - urn:alm:descriptor:com.tectonic.ui:select:repository
          - urn:alm:descriptor:expression:props.options:api:/clusters-rewrite/${context.cluster}${context.connector.status.api.path}/api/v4/projects?simple=true
          - urn:alm:descriptor:expression:props.options:label:path:path_with_namespace
          - urn:alm:descriptor:expression:props.options:value:path:path_with_namespace
          - urn:alm:descriptor:label:en:Repository
          - urn:alm:descriptor:label:zh:Repository
          - urn:alm:descriptor:description:zh:Repository path including group name or username, e.g. mygroup/my-app.
          - urn:alm:descriptor:description:en:Repository path including group name or username, e.g. mygroup/my-app.

Example: Listing Git References

Git connector provides a gitrefs endpoint for listing branches and tags:

kind: ResourceInterface
metadata:
  name: gitcoderepository
  annotations:
    style.tekton.dev/descriptors: >-
      - path: params.revision
        x-descriptors:
          - urn:alm:descriptor:com.tectonic.ui:select:revision
          - urn:alm:descriptor:expression:props.options:api:/clusters-rewrite/${context.cluster}${context.connector.status.api.path}/git/gitrefs?repositoryUrl=${context.connector.spec.address + "/" + context.params.repository + ".git"}&search=${current.search}
          - urn:alm:descriptor:expression:props.options:path:items
          - urn:alm:descriptor:expression:props.options:label:path:name
          - urn:alm:descriptor:expression:props.options:value:path:name
          - urn:alm:descriptor:label:en:Revision
          - urn:alm:descriptor:label:zh:Revision
          - urn:alm:descriptor:description:zh:Git revision reference, e.g. refs/heads/main.
          - urn:alm:descriptor:description:en:Git revision reference (e.g., refs/heads/main for branches)

Reference OpenAPI Display Schema

To centralize API definitions and display configurations, define them in the ConnectorClass using spec.api.openapi. Dynamic forms can then reference these definitions directly, eliminating redundant configurations across ResourceInterfaces.

Prerequisites

  1. Define the OpenAPI specification in the ConnectorClass. See ConnectorClass OpenAPI Description for details.
  2. Add the x-display-schema extension to define how the API integrates with dynamic forms.

Display Schema Structure

The x-display-schema extension contains:

  • parameters[]: Defines how to populate API parameters at runtime.
    • name: Parameter name (must match the API parameter name)
    • value: Parameter value expression. Syntax follows Pipeline Dynamic Forms.
  • descriptors: Defines how API response data maps to form options. Syntax follows Pipeline Dynamic Forms.

Example: Git References API

The following ConnectorClass configuration defines the GET /git/gitrefs API with display schema:

  • The repositoryUrl parameter is set to ${context.connector.spec.address + "/" + context.params.repository + ".git"} and passed as a query parameter
  • The search parameter is set to ${current.search} for filtering results
  • The response items array is mapped to select options, using name for both label and value

example:

kind: ConnectorClass
spec:
  api:
    openapi:
      openapi: 3.0.3
      info:
        title: Git API
        version: v1alpha1
      paths:
        /git/gitrefs:
          get:
            x-provider-type: api
            x-display-schema:
              parameters:
              - name: repositoryUrl
                value: ${context.connector.spec.address + "/" + context.params.repository + ".git"}
              - name: search
                value: ${current.search}
              descriptors:
              - urn:alm:descriptor:expression:props.options:path:items
              - urn:alm:descriptor:expression:props.options:label:path:name
              - urn:alm:descriptor:expression:props.options:value:path:name
            operationId: listGitRefs
            parameters:
            - name: repositoryUrl
              in: query
              description: "Cloneable URL of the repository (e.g., https://github.com/mygroup/my-app.git)"
              required: true
              schema:
                type: string
            - name: search
              in: query
              description: "Return list of git references containing the search string"
              required: false
              schema:
                type: string
            responses:
              '200':
                description: "All git references for a repository"
                content:
                  application/json: {}

Referencing OpenAPI in ResourceInterface

Once the API is defined in ConnectorClass, reference it in your ResourceInterface using the following syntax:

  • urn:alm:descriptor:widgets:select to specify the widget type
  • schema:openapi:context.connectorClass.spec.api.openapi:<operationId> to reference the API definition in the ConnectorClass

for example:

kind: ResourceInterface
metadata:
  name: gitcoderepository
  annotations:
    style.tekton.dev/descriptors: >-
      - path: params.revision
        x-descriptors:
          - urn:alm:descriptor:widgets:select
          - urn:alm:descriptor:expression:props.options:schema:openapi:context.connectorClass.spec.api.openapi:listGitRefs
          - urn:alm:descriptor:label:en:Revision
          - urn:alm:descriptor:label:zh:Revision
          - urn:alm:descriptor:description:zh:Git revision reference, e.g. refs/heads/main.
          - urn:alm:descriptor:description:en:Git revision reference (e.g., refs/heads/main for branches)

With this configuration, the revision field in Pipeline Integration renders as a dropdown that fetches options from the listGitRefs API.

Examples

GitCodeRepository ResourceInterface

apiVersion: connectors.alauda.io/v1alpha1
kind: ResourceInterface
metadata:
  name: gitcoderepository
  labels:
    resourceinterface.connectors.cpaas.io/category: "GitCodeRepository"
spec:
  params:
  - name: repository
    type: string
    description: "Repository name"
  - name: revision
    type: string
    default: "refs/heads/main"
    description: "Git revision"
  attributes:
  - name: url
    type: string
    expression: "{connector.spec.address + '/' + params.repository}"
    parameterize:
      name: git-url
    dependsOn:
    - params.repository
    - connector
  - name: revision
    type: string
    expression: "{params.revision}"
    parameterize:
      name: git-revision
    dependsOn:
    - params.revision
  workspaces:
  - name: git-source
    workspaceMapping:
      name: git-source
    value:
      volumeClaimTemplate:
        spec:
          accessModes: [ReadWriteMany]
          resources:
            requests:
              storage: 200Mi
  - name: git-basic-auth
    workspaceMapping:
      name: git-basic-auth
    value:
      csi:
        driver: connectors-csi
        readOnly: true
        volumeAttributes:
          connector.name: "{connector.metadata.name}"
          connector.namespace: "{connector.metadata.namespace}"
          configuration.names: "gitconfig"
          token.expiration: 30m

OCIArtifact ResourceInterface

apiVersion: connectors.alauda.io/v1alpha1
kind: ResourceInterface
metadata:
  name: ociartifact
  labels:
    resourceinterface.connectors.cpaas.io/category: "OCIArtifact"
spec:
  params:
  - name: repository
    type: string
    description: "Repository name"
  - name: tags
    type: array
    description: "Image tags"
  attributes:
  - name: repository-address
    type: string
    expression: "{connector.spec.registry + '/' + params.repository}"
    dependsOn:
    - params.repository
    - connector
  - name: artifact-versions
    type: array
    expression: "{params.tags.map(tag => connector.spec.registry + '/' + params.repository + ':' + tag)}"
    dependsOn:
    - params.repository
    - params.tags
    - connector
  workspaces:
  - name: registry-config
    workspaceMapping:
      name: registry-config
    value:
      csi:
        driver: connectors-csi
        readOnly: true
        volumeAttributes:
          connector.name: "{connector.metadata.name}"
          connector.namespace: "{connector.metadata.namespace}"
          configuration.names: "config"
          token.expiration: 60m

What's Next

  • Understand Pipeline Integration When you want to integrate Connector in your custom Pipeline or Task.

References