Skip to content

Commit 8f84d0a

Browse files
author
edge-katanomi-app2[bot]
committed
📚 Sync docs from alaudadevops/tektoncd-operator on 6caa1987d61938822e2d3501a1028dc6834e4bd4
Source: feat: [DEVOPS-42644] support catalog overview template (#857) Author: yzc Ref: refs/heads/main Commit: 6caa1987d61938822e2d3501a1028dc6834e4bd4 This commit automatically syncs documentation changes from the source-docs repository. 🔗 View source commit: https://github.com/alaudadevops/tektoncd-operator/commit/6caa1987d61938822e2d3501a1028dc6834e4bd4 🤖 Synced on 2025-12-02 05:45:37 UTC
1 parent 5f1fc16 commit 8f84d0a

File tree

4 files changed

+405
-4
lines changed

4 files changed

+405
-4
lines changed

.github/SYNC_INFO.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Documentation Sync Information
22

3-
- **Last synced**: 2025-11-28 07:22:00 UTC
3+
- **Last synced**: 2025-12-02 05:45:37 UTC
44
- **Source repository**: alaudadevops/tektoncd-operator
5-
- **Source commit**: [4596472ae44bf23c098627213515a24a978927d0](https://github.com/alaudadevops/tektoncd-operator/commit/4596472ae44bf23c098627213515a24a978927d0)
5+
- **Source commit**: [6caa1987d61938822e2d3501a1028dc6834e4bd4](https://github.com/alaudadevops/tektoncd-operator/commit/6caa1987d61938822e2d3501a1028dc6834e4bd4)
66
- **Triggered by**: edge-katanomi-app2[bot]
7-
- **Workflow run**: [#103](https://github.com/alaudadevops/tektoncd-operator/actions/runs/19756948764)
7+
- **Workflow run**: [#104](https://github.com/alaudadevops/tektoncd-operator/actions/runs/19848629850)
88

99
## Files synced:
1010
- docs/

docs/en/development/catalog/convention.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,81 @@ When adding a new Task, cover the following cases:
204204
- Allow skipping certificate verification for HTTPS: expose a toggle parameter and clearly document the risks and when to use it.
205205
- Trust HTTPS via user-provided certificates: expose a workspace for mounting custom CAs/truststores.
206206
- If the tool uses a “full replacement” trust-store strategy: implement append/merge logic in the Task so user certificates are added to the default trust chain rather than overwriting it, preventing breaks to other HTTPS endpoints and improving UX.
207+
208+
### 10. Task Overview Templates (ConfigMap + Template)
209+
210+
We support two overview rendering paths as described in [TEP-0003: PipelineRun Support Markdown Output](../../teps/0003_pipelinerun_markdown_output.md) and [TEP-0004: Task Overview Template Rendering](../../teps/catalog/0004-task-result-template.md) :
211+
212+
1. A `overview-markdown` Task result containing fully-rendered markdown.
213+
2. A ConfigMap-backed template (for example, using the EJS engine) that consumes structured Task results.
214+
215+
For catalog contributors, we adopt the following conventions:
216+
217+
- **Platform-provided / curated overview templates MUST use the ConfigMap + template path.**
218+
- Do **not** let catalog Tasks we own write to a `overview-markdown` result by default.
219+
- Tasks that support user-defined scripts should, where possible, provide an empty `overview-markdown` result for users to use.
220+
- Treat `overview-markdown` as a user extension point: if a Pipeline or Task wants to override the UI, it can emit this result and the UI will prefer it over any ConfigMap template.
221+
222+
- **ConfigMap location and labels**
223+
224+
- ConfigMaps that contain EJS overview templates MUST be stored under the [catalog](https://github.com/AlaudaDevops/catalog) repository's `config/catalog/` directory, and be shipped together with other catalog manifests.
225+
- Templates are deployed into the `kube-public` namespace so any dashboard instance can read them.
226+
- Each ConfigMap corresponds to one Task (and version) that owns the overview template and MUST carry the following labels so the UI can discover it:
227+
228+
```yaml
229+
# config/catalog/sonarqube-scanner-0.5-overview-template.yaml
230+
apiVersion: v1
231+
kind: ConfigMap
232+
metadata:
233+
name: sonarqube-scanner-0.5-overview-template
234+
namespace: kube-public
235+
annotations:
236+
# keep namespace hardcoded to kube-public even when InstallerSets perform ReplaceNamespace
237+
operator.tekton.dev/preserve-namespace: "true"
238+
labels:
239+
# task name
240+
style.tekton.dev/overview-template-task: sonarqube-scanner
241+
# task version
242+
style.tekton.dev/overview-template-task-version: "0.5"
243+
# template engine
244+
style.tekton.dev/overview-template-engine: ejs
245+
data:
246+
# main EJS template entry
247+
template.ejs: |
248+
<!-- EJS template content -->
249+
```
250+
251+
- **Task annotations for template binding**
252+
253+
- Tasks that use a ConfigMap-based overview MUST declare which template to use and which result(s) provide the data.
254+
- Use annotations on the Task to tell the UI how to find the template and which results to merge:
255+
256+
```yaml
257+
apiVersion: tekton.dev/v1
258+
kind: Task
259+
metadata:
260+
name: sonarqube-scanner
261+
annotations:
262+
# label selector to find the ConfigMap under kube-public
263+
style.tekton.dev/overview-template-selector: "style.tekton.dev/overview-template-task=sonarqube-scanner,style.tekton.dev/overview-template-task-version=0.5"
264+
265+
# one or more result names that provide structured metrics
266+
# single result:
267+
style.tekton.dev/overview-template-result-key: CODE_SCAN_METRICS
268+
269+
# optional: multiple results and aliasing (advanced)
270+
# style.tekton.dev/overview-template-result-key: CODE_SCAN_METRICS:metrics,SCAN_RESULT_URL,SCAN_PROJECT
271+
```
272+
273+
- `overview-template-selector` tells the UI which ConfigMap to fetch (via label selector).
274+
- `overview-template-result-key` identifies the Task result (or comma-separated list of results) that carries the structured metrics.
275+
276+
- **Result contract and `overview-markdown` usage**
277+
278+
- The result should be:
279+
- Compact enough to stay within the effective per-container termination-message budget.
280+
- Stable and documented in the Task's `README.md` so template authors and other consumers know which keys are available.
281+
- Do **not** store rendered HTML in results or annotations; only store structured data (metrics, URLs, labels).
282+
- `overview-markdown` is reserved for user-authored or downstream custom views. The UI always prefers `overview-markdown` over ConfigMap templates so that:
283+
- Catalog contributors use ConfigMap templates for pre-baked views.
284+
- Users can still override the overview by emitting their own `overview-markdown` result from Pipelines or Tasks that they control.

0 commit comments

Comments
 (0)