You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📚 Sync docs from alaudadevops/connectors-operator on bc90488f076b70de1ee82abef9dcb93c4305c567
Source: docs: add docs to describe how to add dynamic forms for resource interface (#434)
Author: edge-katanomi-app2[bot]
Ref: refs/heads/main
Commit: bc90488f076b70de1ee82abef9dcb93c4305c567
This commit automatically syncs documentation changes from the source-docs repository.
🔗 View source commit: https://github.com/alaudadevops/connectors-operator/commit/bc90488f076b70de1ee82abef9dcb93c4305c567
🤖 Synced on 2025-12-12 01:40:40 UTC
more details please refer to [dynamic-form](#dynamic-form).
118
+
105
119
### Resource Categories \{#categories}
106
120
107
121
ResourceInterface organizes resources into categories that define common contracts and behaviors. Categories are marked using the label `resourceinterface.connectors.cpaas.io/category`.
@@ -280,6 +294,199 @@ This enables the system to match compatible connectors with ResourceInterfaces a
280
294
281
295
More about ConnectorClass please refer to [Concept of ConnectorClass](./connectorclass.mdx)
282
296
297
+
## Dynamic Form \{#dynamic-form}
298
+
299
+
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.
300
+
301
+
### Overview
302
+
303
+
Use the `style.tekton.dev/descriptors` annotation to define dynamic form behavior for parameters. Here is an example:
- urn:alm:descriptor:description:zh:Repository path including group name or username, e.g. mygroup/my-app.
318
+
- urn:alm:descriptor:description:en:Repository path including group name or username, e.g. mygroup/my-app.
319
+
```
320
+
321
+
The syntax follows the <ExternalSiteLink name="pipelines" href="/pipelines/how_to/configure_dynamic_forms.html" children="Pipeline Dynamic Forms" /> specification. Familiarity with that documentation is recommended before proceeding.
322
+
323
+
In addition to the standard capabilities, dynamic forms in ResourceInterface support:
324
+
325
+
- **Extended context variables** for accessing connector and ResourceInterface data
326
+
- **Reference OpenAPI display schema** definitions in ConnectorClass for centralized API configuration and reference the api definition when using dynamic form
327
+
328
+
### Extended Context Variables
329
+
330
+
The following context variables are available in ResourceInterface dynamic forms:
331
+
332
+
| Variable | Description |
333
+
| -------- | ----------- |
334
+
| `context.connector` | The Connector object. Access any field, e.g., `context.connector.status.api.path` |
335
+
| `context.connectorClass` | The ConnectorClass object. Access any field, e.g., `context.connectorClass.spec.api.openapi` |
| `context.resourceInterface` | The ResourceInterface object. Access any field as needed |
338
+
339
+
### Dynamic Form Configuration Approaches
340
+
341
+
There are two approaches to configure dynamic forms in ResourceInterface:
342
+
343
+
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](./connector_api.mdx) endpoints for listing repositories, git references, and more.
344
+
345
+
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.
346
+
347
+
You can use either approach independently or combine them as needed.
348
+
349
+
### Direct API Configuration
350
+
351
+
**Example: Listing GitLab Repositories**
352
+
353
+
GitLab connectors expose the native GitLab API, which can be used to populate a repository selector:
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.
399
+
400
+
**Prerequisites**
401
+
402
+
1. Define the OpenAPI specification in the ConnectorClass. See [ConnectorClass OpenAPI Description](./connectorclass.mdx#api_openapi) for details.
403
+
2. Add the `x-display-schema` extension to define how the API integrates with dynamic forms.
404
+
405
+
**Display Schema Structure**
406
+
407
+
The `x-display-schema` extension contains:
408
+
409
+
- `parameters[]`: Defines how to populate API parameters at runtime.
410
+
- `name`: Parameter name (must match the API parameter name)
- `descriptors`: Defines how API response data maps to form options. Syntax follows <ExternalSiteLink name="pipelines" href="pipelines/how_to/configure_dynamic_forms.html" children="Pipeline Dynamic Forms" />.
413
+
414
+
**Example: Git References API**
415
+
416
+
The following ConnectorClass configuration defines the `GET /git/gitrefs` API with display schema:
417
+
418
+
- The `repositoryUrl` parameter is set to `${context.connector.spec.address + "/" + context.params.repository + ".git"}` and passed as a query parameter
419
+
- The `search` parameter is set to `${current.search}` for filtering results
420
+
- The response `items` array is mapped to select options, using `name` for both label and value
Copy file name to clipboardExpand all lines: docs/en/overview/release_notes.mdx
+27-7Lines changed: 27 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,25 +29,45 @@ The following table shows the compatibility and support matrix between the Alaud
29
29
30
30
### Features and Enhancements
31
31
32
-
- Provides out-of-the-box definitions for `GitCodeRepository`, `OCIArtifact`, and `MavenArtifact` resources, enabling seamless integration of external resources (Git repositories, OCI artifacts, Maven artifacts) into TektonCD pipelines through a unified UI interface. For more details, see
- Add docs to explain credential permissions required for each connector. more details: [Credential Permissions Required](../connectors-git/concepts/git_connectorclass.mdx#credential_permissions_required)
32
+
**More Connectors**
33
+
36
34
- Support integration with GitLab Server by using GitLab Connector. more details:
- Support accessing tool's original API through the Connector API when the ConnectorClass provides Proxy Service capabilities. The system now supports two ways to access tool resources: using the tool's original API via Proxy Service, or using custom APIs provided for the ConnectorClass. For more details, see
- Provides out-of-the-box definitions for `GitCodeRepository`, `OCIArtifact`, and `MavenArtifact` resources, enabling seamless integration of external resources (Git repositories, OCI artifacts, Maven artifacts) into TektonCD pipelines through a unified UI interface. For more details, see
- Support Dynamic Form in ResourceInterface for Pipeline Integration. For more details, see [ResourceInterface Dynamic Form](../connectors/concepts/resource_interface.mdx#dynamic-form).
47
+
48
+
**Connector API Enhancement**
49
+
50
+
- Support accessing tool's original API through the Connector API when the ConnectorClass provides Proxy Service capabilities. The system now supports two ways to access tool resources: using the tool's original API via Proxy Service, or using custom APIs provided for the ConnectorClass. For more details, see [Connector API](../connectors/concepts/connector_api.mdx).
51
+
52
+
**ConnectorClass Customization Flexibility**
53
+
44
54
- Support using Rego rules to extract tokens from client requests when using the built-in HTTP reverse proxy. Combined with the existing ability to inject authentication credentials into backend requests through Rego rules, you can now extend the built-in reverse proxy's capabilities to support tools with non-standard HTTP authentication mechanisms.
45
55
- For token extraction configuration, see [Custom Rego-based Authentication](../connectors/concepts/connectors_proxy.mdx#custom-rego-based-authentication).
46
56
- For authentication injection configuration, see [Injecting Authentication Credentials into Backend Request when using built-in Reverse Proxy](../connectors/concepts/connectors_proxy.mdx#injecting-authentication-when-using-built-in-reverse-proxy).
47
57
- Support using request variables in `spec.auth.types[].generator.rego` to inject authentication credentials into backend requests. more details: [Variables Available in Rego](../connectors/concepts/connectorclass.mdx#variables-available-in-rego).
48
-
- OCI Connector supports using forward proxy for image operations. For more details, see [OCI Connector Forward Proxy](../connectors-oci/concepts/oci_connectorclass.mdx#forward-proxy)
58
+
59
+
**OCI Connector Forward Proxy**
60
+
61
+
- OCI Connector supports using forward proxy for image operations. For more details, see [OCI Connector Forward Proxy](../connectors-oci/concepts/oci_connectorclass.mdx#forward-proxy).
62
+
63
+
**CSI Driver Built-in Configurations**
64
+
49
65
-`Connectors CSI Driver` provides built-in configuration files that are always mounted into Pods. For more details, see [Built-in Configurations](../connectors/concepts/connectors_csi.mdx#built-in-configurations).
50
66
67
+
**Other Enhancements**
68
+
69
+
- Add docs to explain credential permissions required for each connector. more details: [Credential Permissions Required](../connectors-git/concepts/git_connectorclass.mdx#credential_permissions_required).
70
+
51
71
### Breaking Changes
52
72
53
73
- Remove the `input.xxx` variable from `spec.auth.types[].generator.rego`. Use `input.data.xxx` instead.
0 commit comments