tektoncd/pipeline

Make container registry configurable for examples and e2e tests

Open

#9,191 opened on Dec 1, 2025

View on GitHub
 (2 comments) (0 reactions) (1 assignee)Go (1,943 forks)auto 404
area/testinghelp wantedkind/documentationkind/feature

Repository metrics

Stars
 (9,013 stars)
PR merge metrics
 (PR metrics pending)

Description

Problem

Examples and e2e tests currently use hardcoded container registries (like gcr.io/christiewilson-catfactory), which causes:

  1. Registry rate limiting when running tests repeatedly - especially with Docker Hub (docker.io) which limits anonymous users to 100 pulls per 6 hours and authenticated users to 200 pulls per 6 hours
  2. Slow test execution due to remote registry pulls
  3. Friction for local development - developers can't easily use local registries

While the test framework has a substituteEnv function that replaces registries with KO_DOCKER_REPO during test execution, this only works for automated tests, not for manually running examples.

Proposed Solution

Make it easy to configure which registry to use for examples and tests. This would allow developers to:

  • Use local registries (like kind.local, registry.local:5000) to avoid rate limits
  • Speed up test/example execution by using cached local images
  • Test in air-gapped or restricted environments

Possible approaches:

  1. Helper script - Create ./hack/run-example.sh that applies registry substitution before running examples
  2. Documentation - Add clear instructions to examples/README.md for using sed or similar tools
  3. Extract utility - Make the existing substituteEnv function available as a standalone tool

Current Workaround

The test/examples_test.go file has a substituteEnv function (lines 79-96) that replaces gcr.io/christiewilson-catfactory with KO_DOCKER_REPO, but it's only accessible during test execution. Users must manually edit YAML files to change registries.

Benefits

  • Avoid registry rate limiting during development/testing
  • Faster test execution with local registries
  • Better developer experience for running examples locally
  • Support for air-gapped/restricted environments

Contributor guide