1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-24 06:15:46 +00:00
catalog/task/kind/0.1
vinamra28 e763a4473e Use latest git-clone in Task's tests
With git-clone version 0.8 and onwards, it started running as non-root
and GKE clusters were having some issues, so, we temporarily moved all
tasks to use git-clone version 0.7. Ref: https://github.com/tektoncd/catalog/pull/1079

Since we have now moved to kind clusters in our CI, this issue is now
resolved and thus moving all tasks to use latest version of git-clone

Signed-off-by: vinamra28 <jvinamra776@gmail.com>
2023-09-22 09:32:22 +01:00
..
tests Use latest git-clone in Task's tests 2023-09-22 09:32:22 +01:00
kind.yaml Add linux/amd64 platform annotation to the rest of the tasks 2021-10-29 17:08:38 +01:00
README.md Add linux/amd64 platform annotation to the rest of the tasks 2021-10-29 17:08:38 +01:00

kind

This configures a kind (Kubernetes-in-Docker) environment to be ran in a Task.

See https://kind.sigs.k8s.io for more details.

Install the Task

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/kind/0.1/kind.yaml

Workspaces

  • source: A workspace that contains the working directory to share among Tasks.

Parameters

Name Description
image kind runtime image to use. Users must override this for their particular runtime environment needed for their kind tests.
command command to run

Platforms

The Task can be run on linux/amd64 platform.

Usage

This task sets up settings needed to run kind in a Tekton Task using Docker-in-Docker. Because of the dependency on DinD, the Task runs in privileged mode. Within the task users can create and interact with the kind clusters like normal.

name: kind
taskRef:
  name: kind
params:
  - name: command
    value: [<your command here>]
  - name: image
    value: <your image here>
workspaces:
  - name: source
    workspace: <workspace>

For a working example, see tests/run.yaml. This clones a sample repo which includes a simple script to create and interact with a kind cluster. image should point to an image containing all runtime dependencies needed to run your test, including kind. See https://github.com/wlynch/tekton-kind/blob/main/Dockerfile for a sample Dockerfile to get started.