Stitch any CI into Tangled
151
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs/tekton: update tekton docs with workspace config

Signed-off-by: Xe Iaso <me@xeiaso.net>

authored by

Xe Iaso and committed by
Tangled
bfe341dc 029d13be

+26 -15
+26 -15
docs/tekton.md
··· 18 18 19 19 ## Required cluster setup 20 20 21 - * Tekton Pipelines is installed in the cluster. 22 - * Tack is deployed inside the same cluster. 23 - * The target Tekton `Pipeline` objects already exist in the namespace 21 + - Tekton Pipelines is installed in the cluster. 22 + - Tack is deployed inside the same cluster. 23 + - The target Tekton `Pipeline` objects already exist in the namespace 24 24 tack is configured to use. 25 - * Tack's Kubernetes service account has RBAC to: 26 - * create, get, list, and watch `tekton.dev` `pipelineruns` 27 - * get, list, and watch `tekton.dev` `taskruns` 28 - * get and list pods 29 - * get pod logs via `pods/log` 25 + - Tack's Kubernetes service account has RBAC to: 26 + - create, get, list, and watch `tekton.dev` `pipelineruns` 27 + - get, list, and watch `tekton.dev` `taskruns` 28 + - get and list pods 29 + - get pod logs via `pods/log` 30 30 31 31 Example RBAC: 32 32 ··· 53 53 54 54 ## Configure Tack 55 55 56 - | Env var | Description | 57 - | ------------------------ | --------------------------------------------------------- | 58 - | `TACK_TEKTON_ENABLED` | Set to `1` to enable the Tekton provider | 59 - | `TACK_TEKTON_NAMESPACE` | Namespace for created `PipelineRun`s (default `default`) | 56 + | Env var | Description | 57 + | ----------------------- | -------------------------------------------------------- | 58 + | `TACK_TEKTON_ENABLED` | Set to `1` to enable the Tekton provider | 59 + | `TACK_TEKTON_NAMESPACE` | Namespace for created `PipelineRun`s (default `default`) | 60 60 61 61 The provider uses Kubernetes in-cluster service account credentials. 62 62 It will not run from a local kubeconfig. ··· 65 65 66 66 There are three separate names: 67 67 68 - * Tack workflow name: the Tangled workflow filename/name, e.g. `ci.yml`. 68 + - Tack workflow name: the Tangled workflow filename/name, e.g. `ci.yml`. 69 69 This remains the Tangled-facing workflow identity in status records. 70 - * Tekton `Pipeline` name: the existing in-cluster pipeline definition, 70 + - Tekton `Pipeline` name: the existing in-cluster pipeline definition, 71 71 e.g. `repo-ci`. This is written to `spec.pipelineRef.name`. 72 - * Tekton `PipelineRun` name: generated by tack per trigger/workflow, 72 + - Tekton `PipelineRun` name: generated by tack per trigger/workflow, 73 73 e.g. `tack-ci-yml-<short-hash>`. This is the concrete execution 74 74 object tack watches and stores. 75 75 ··· 92 92 service_account: pipeline-runner 93 93 params: 94 94 image: example/app 95 + workspaces: 96 + - name: repo-data 97 + access_modes: ["ReadWriteOnce"] 98 + storage: 1Gi 99 + - name: go-mod-cache 100 + pvc: go-mod-cache 95 101 ``` 96 102 97 103 `params` are forwarded as string Tekton params. Tack also stores the 98 104 knot, pipeline rkey, workflow name, actor DID, commit, and branch as 99 105 `PipelineRun` annotations, so operators can inspect the Kubernetes 100 106 object and connect it back to the Tangled trigger. 107 + 108 + Workspaces correlate to 109 + [Tekton workspaces](https://tekton.dev/docs/pipelines/workspaces/) and 110 + are useful for creating a temporary PVC with git clones, intermediate 111 + build products, or other build artifacts. 101 112 102 113 ## Example Pipeline 103 114