Skip to content

Development Environment

Structure

New projects scaffolded using go-tektasker init come with an opinionated development environment.

It is composed of:

  • a .env file, allowing you to customize the behavior of the environment.
  • a Taskfile.yaml file that is an equivalent of makefiles, see TaskFile for more information.

Usage

We tried to make the development environment as simple as possible so you can understand it quickly and tune it to your taste. This is why we chose Taskfile over of GNU Make: the YAML spec should be simpler to understand.

Tasks

  • task shows the status of your dev env and list available tasks.
  • task status shows the status of your dev env, this is useful to ensure you have all dependencies installed.
  • task manifest generates your task’s YAML manifest.
  • task generate generates go helper code for your params and results.
  • task apply generates everything and apply your task using the configured context.

Configuration

All configuration options are documented in the .env file.

Requirements

Please, see the installation instructions.

Kubernetes Cluster

Indeed, a Kubernetes cluster with Tekton Pipelines installed is needed. You also need to be able to push container images to a registry this cluster can pull from.

The recommended setup is:

  • Use a local Kubernetes environment for development (e.g. KinD, Rancher Desktop, …)
  • Integrate Tektasker in your deployment process (CI/CD, GitOps, …) for production.

KinD

You only need to change KO_DOCKER_REPO to kind.local so ko loads your task container image directly to your KinD cluster.

Note though that ko will, by default, try to load the image into the default (kind) cluster, if you want to use a specific named KinD cluster, you need to specify the name with KIND_CLUSTER_NAME. To know more, see ko documentation.

Enjoy!