···18181919## Required cluster setup
20202121-* Tekton Pipelines is installed in the cluster.
2222-* Tack is deployed inside the same cluster.
2323-* The target Tekton `Pipeline` objects already exist in the namespace
2121+- Tekton Pipelines is installed in the cluster.
2222+- Tack is deployed inside the same cluster.
2323+- The target Tekton `Pipeline` objects already exist in the namespace
2424 tack is configured to use.
2525-* Tack's Kubernetes service account has RBAC to:
2626- * create, get, list, and watch `tekton.dev` `pipelineruns`
2727- * get, list, and watch `tekton.dev` `taskruns`
2828- * get and list pods
2929- * get pod logs via `pods/log`
2525+- Tack's Kubernetes service account has RBAC to:
2626+ - create, get, list, and watch `tekton.dev` `pipelineruns`
2727+ - get, list, and watch `tekton.dev` `taskruns`
2828+ - get and list pods
2929+ - get pod logs via `pods/log`
30303131Example RBAC:
3232···53535454## Configure Tack
55555656-| Env var | Description |
5757-| ------------------------ | --------------------------------------------------------- |
5858-| `TACK_TEKTON_ENABLED` | Set to `1` to enable the Tekton provider |
5959-| `TACK_TEKTON_NAMESPACE` | Namespace for created `PipelineRun`s (default `default`) |
5656+| Env var | Description |
5757+| ----------------------- | -------------------------------------------------------- |
5858+| `TACK_TEKTON_ENABLED` | Set to `1` to enable the Tekton provider |
5959+| `TACK_TEKTON_NAMESPACE` | Namespace for created `PipelineRun`s (default `default`) |
60606161The provider uses Kubernetes in-cluster service account credentials.
6262It will not run from a local kubeconfig.
···65656666There are three separate names:
67676868-* Tack workflow name: the Tangled workflow filename/name, e.g. `ci.yml`.
6868+- Tack workflow name: the Tangled workflow filename/name, e.g. `ci.yml`.
6969 This remains the Tangled-facing workflow identity in status records.
7070-* Tekton `Pipeline` name: the existing in-cluster pipeline definition,
7070+- Tekton `Pipeline` name: the existing in-cluster pipeline definition,
7171 e.g. `repo-ci`. This is written to `spec.pipelineRef.name`.
7272-* Tekton `PipelineRun` name: generated by tack per trigger/workflow,
7272+- Tekton `PipelineRun` name: generated by tack per trigger/workflow,
7373 e.g. `tack-ci-yml-<short-hash>`. This is the concrete execution
7474 object tack watches and stores.
7575···9292 service_account: pipeline-runner
9393 params:
9494 image: example/app
9595+ workspaces:
9696+ - name: repo-data
9797+ access_modes: ["ReadWriteOnce"]
9898+ storage: 1Gi
9999+ - name: go-mod-cache
100100+ pvc: go-mod-cache
95101```
9610297103`params` are forwarded as string Tekton params. Tack also stores the
98104knot, pipeline rkey, workflow name, actor DID, commit, and branch as
99105`PipelineRun` annotations, so operators can inspect the Kubernetes
100106object and connect it back to the Tangled trigger.
107107+108108+Workspaces correlate to
109109+[Tekton workspaces](https://tekton.dev/docs/pipelines/workspaces/) and
110110+are useful for creating a temporary PVC with git clones, intermediate
111111+build products, or other build artifacts.
101112102113## Example Pipeline
103114