Local Development for tekton-pruner

VerifiedCaution

Set up a local development environment for tekton-pruner, covering kind, ko, Tekton Pipelines, and observability stack.

Sby Skills Guide Bot
DevelopmentIntermediate
7/24/2026
Claude Code
#kubernetes#tekton#kind#local-dev#controller-development

Recommended for

Automated summary

A guide to standing up a local development environment for the tekton-pruner Kubernetes controller: kind cluster, local registry, ko-based deployment, controller and webhook iteration, plus an optional observability stack.

Strengths

  • Provides an end-to-end bootstrap script (hack/dev/kind/install.sh) that starts a registry, creates the kind cluster, installs Tekton Pipelines and deploys the pruner
  • Gives targeted redeploy commands (ko apply against config/controller.yaml or config/webhook.yaml) so code changes can be tested quickly
  • Documents the observability stack with concrete URLs for Prometheus, Jaeger and the pruner metrics endpoint
  • Includes an environment variable table (KO_DOCKER_REPO, KIND_CLUSTER_NAME, CONTAINER_RUNTIME) and a troubleshooting section for common failures

Limitations

  • Assumes go, kind, ko, kubectl and docker/podman are already installed on the machine
  • Paths and commands are specific to the tekton-pruner repository and do not transfer directly to other projects
  • Covers only the local kind environment: no guidance for remote clusters, CI, or image publishing
When to use it

Use it when onboarding onto tekton-pruner or when you need to test controller, webhook or pruning-configuration changes locally.

When not to use it

Avoid it when you need production deployment guidance, or when working on a project other than tekton-pruner.

Security analysis

Caution
Quality score84/100

No destructive, exfiltration, or obfuscation patterns (no rm -rf /, curl|sh, or secret exfiltration) appear; the instructions are standard local-dev docs operating on a local kind cluster. Risk is moderate because it relies on opaque repo scripts and cluster-mutating tooling, so it falls under caution rather than safe.

Findings
  • •Delegates execution to repo-provided scripts (./hack/dev/kind/install.sh, ./hack/setup-observability-dev.sh) whose contents are not shown, so their behavior can't be verified from this file alone.
  • •Includes resource-destroying commands (`ko delete -f config/`, `kind delete cluster --name kind`) that, while scoped to local dev, can remove the local cluster and deployed resources.
  • •Uses powerful tools (kind, ko, kubectl, docker, make) that build/push images and mutate a Kubernetes cluster; a mistargeted KO_DOCKER_REPO or KUBECONFIG could affect the wrong registry/cluster.
How this analysis is made

Examples

First-time setup
I just cloned tekton-pruner. Walk me through standing up a local kind cluster with the registry, Tekton Pipelines and the pruner controller, then verify the pods are running.
Iterate on the webhook
I changed the admission webhook code in tekton-pruner. Run the unit tests, format the code, redeploy just the webhook with ko, and tail its logs in the tekton-pipelines namespace.
Debug a broken setup
My pruner controller can't pull images and the webhook reports TLS errors in my local kind setup. Help me check the kind-registry container, KO_DOCKER_REPO, and recover the webhook certificate.

name: local-development description: >- Set up a local development environment for tekton-pruner. Use when onboarding, bootstrapping a kind cluster, deploying the operator locally, or iterating on controller and webhook changes. Covers kind, ko, Tekton Pipelines, and the observability stack (Prometheus + Jaeger). license: Apache-2.0 compatibility: Requires go, kind, ko, kubectl, docker (or podman) metadata: project: tekton-pruner maintainers: tektoncd allowed-tools: Bash(kind:) Bash(ko:) Bash(kubectl:) Bash(docker:) Bash(make:*) Read

Local Development

tekton-pruner is a Kubernetes controller and admission webhook that prunes Tekton PipelineRun and TaskRun resources based on TTL or history limits configured via a ConfigMap or per-namespace annotations.

Prerequisites

Install the following tools before proceeding:

| Tool | Purpose | |------|---------| | go (≥ 1.26) | Build language | | kind | Local Kubernetes cluster | | ko | Build and push Go container images | | kubectl | Interact with the cluster | | docker or podman | Container runtime (podman sets CONTAINER_RUNTIME=podman) |

Quick-Start: Full Cluster Setup

The recommended path for a fresh local environment:

cd hack/dev/kind/
./install.sh

This script:

  1. Starts a local container registry on port 5000 (kind-registry)
  2. Creates a kind cluster named kind (override with KIND_CLUSTER_NAME)
  3. Wires the cluster to the registry
  4. Sets KUBECONFIG to ~/.kube/config.kind
  5. Deploys Tekton Pipelines and the pruner controller via ko apply

After it completes, verify:

export KUBECONFIG=~/.kube/config.kind
kubectl get pods -n tekton-pipelines

Deploy Only the Pruner

If you already have a cluster with Tekton Pipelines running:

export KO_DOCKER_REPO=<your-registry>   # e.g. ko.local or localhost:5000
ko apply -f config/

To redeploy individual components after code changes:

# Controller only
ko apply -f config/controller.yaml

# Webhook only
ko apply -f config/webhook.yaml

Observability Stack (Optional)

For metrics and tracing during development:

./hack/setup-observability-dev.sh

Endpoints after setup:

| Service | URL | |---------|-----| | Prometheus | http://localhost:9091 | | Jaeger (tracing) | http://localhost:16686 | | Pruner metrics | http://localhost:9090/metrics |

Iterating on Code

  1. Edit Go source under pkg/ or cmd/.
  2. Run unit tests to verify: make test-unit
  3. Format code: make fmt
  4. Rebuild and redeploy (ensure KO_DOCKER_REPO is set — see "Deploy Only the Pruner" above): ko apply -f config/controller.yaml
  5. Check controller logs:
kubectl -n tekton-pipelines logs deployment/tekton-pruner-controller -f

Tear Down

ko delete -f config/
# or to destroy the entire kind cluster:
kind delete cluster --name kind

Environment Variables

| Variable | Default | Purpose | |----------|---------|---------| | KO_DOCKER_REPO | (required) | Image registry for ko builds | | KIND_CLUSTER_NAME | kind | Name of the kind cluster | | CONTAINER_RUNTIME | docker | Set to podman for rootless builds |

Common Issues

  • ko not found: Run make apply — it auto-installs ko into .bin/.
  • Registry not reachable: Ensure kind-registry container is running: docker ps | grep kind-registry
  • Webhook TLS errors: The webhook cert is managed by the operator. If invalid, delete the Secret and restart the webhook pod.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/local-development-for-tekton-pruner-mryiqgmv/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/local-development-for-tekton-pruner-mryiqgmv' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/local-development-for-tekton-pruner-mryiqgmv/download' --output '.skill-downloads/local-development-for-tekton-pruner-mryiqgmv/SKILL.md.part' && mv '.skill-downloads/local-development-for-tekton-pruner-mryiqgmv/SKILL.md.part' '.skill-downloads/local-development-for-tekton-pruner-mryiqgmv/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Environment declared by the author: Requires go, kind, ko, kubectl, docker (or podman)

Tools declared by the author (check availability in your agent): Bash(kind:*) Bash(ko:*) Bash(kubectl:*) Bash(docker:*) Bash(make:*) Read

Original excerpt: Prerequisites

Install the following tools before proceeding:

ToolPurpose
go (≥ 1.26)Build language
kindLocal Kubernetes cluster
koBuild and push Go container images
kubectlInteract with the cluster
docker or podmanContainer runtime (podman sets CONTAINER_RUNTIME=podman)

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/local-development-for-tekton-pruner-mryiqgmv/SKILL.md' && test -s '.skill-downloads/local-development-for-tekton-pruner-mryiqgmv/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/local-development' && cp -R '.skill-downloads/local-development-for-tekton-pruner-mryiqgmv' '.claude/skills/local-development'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/local-development-for-tekton-pruner-mryiqgmv'

openskills read 'local-development-for-tekton-pruner-mryiqgmv'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/local-development-for-tekton-pruner-mryiqgmv/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills