Skip to content

feat: modernize kaniko repo on par with git-clone and golang - #2

Merged
vdemeester merged 3 commits into
tektoncd-catalog:mainfrom
vdemeester:modernize-kaniko
Jul 3, 2026
Merged

feat: modernize kaniko repo on par with git-clone and golang#2
vdemeester merged 3 commits into
tektoncd-catalog:mainfrom
vdemeester:modernize-kaniko

Conversation

@vdemeester

Copy link
Copy Markdown
Member

Changes

Modernize the kaniko repository to match the structure and quality of the git-clone and golang repos in tektoncd-catalog.

Task modernization:

  • Upgrade from tekton.dev/v1beta1 to tekton.dev/v1 API
  • Switch from archived GoogleContainerTools/kaniko (v1.5.1) to the community-maintained fork osscontainertools/kaniko (v1.27.6)
  • Add multi-arch support: linux/amd64, linux/arm64, linux/ppc64le
  • Add KANIKO_DIR param for bootstrapping kaniko with itself
  • Fix EXTRA_ARGS array expansion ($(params.EXTRA_ARGS[*]))
  • Replace pinned bash image with alpine for the write-url step

StepAction:

  • Add derived stepaction/kaniko/kaniko.yaml (generated from the Task, never edited directly)
  • Generation script (hack/generate-stepaction.py) converts workspaces to params (sourcesource-path, dockerconfigdockerconfig-path)
  • Merges both Task steps (build + write-url) into a single StepAction script

CI/CD:

  • build.yaml: lint (YAML validation + StepAction sync check) + e2e matrix across 4 Tekton Pipelines LTS versions + bundle e2e
  • release.yaml: tag-triggered Tekton bundle publish to ghcr.io/tektoncd-catalog/kaniko
  • Dependabot for GitHub Actions updates

Repository scaffolding:

  • README, CONTRIBUTING, DEVELOPMENT, AGENTS.md, LICENSE, OWNERS
  • ArtifactHub metadata for both task and stepaction
  • PR template
  • Release script (hack/release.sh)

Tests:

  • E2E test using Kind cluster + in-cluster registry
  • Bundle resolver e2e test via ttl.sh

Reference: tektoncd/catalog PR #1385 for the kaniko fork context.

Submitter Checklist

Release Notes

Modernize kaniko Task to v1 API with osscontainertools/kaniko fork, add StepAction, CI/CD workflows, e2e tests, and full repository scaffolding.

@tekton-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 3, 2026
- Upgrade Task from v1beta1 to v1 API
- Switch from archived GoogleContainerTools/kaniko to
  community fork osscontainertools/kaniko (v1.27.6)
- Add multi-arch support (amd64, arm64, ppc64le)
- Add KANIKO_DIR param for bootstrapping kaniko with itself
- Create derived StepAction with generation script
- Add repo scaffolding: README, CONTRIBUTING, DEVELOPMENT,
  AGENTS.md, LICENSE, OWNERS, .gitignore
- Add GitHub workflows: build (lint + e2e matrix), release
  (Tekton bundle publish)
- Add ArtifactHub metadata for task and stepaction
- Add e2e tests and bundle e2e test
- Add release script (hack/release.sh)
- Add dependabot for GitHub Actions
- Remove old v1beta1 test fixtures

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
The test script had a stale TaskRun with invalid fields (stepTemplate,
volumes) that failed strict decoding. Only the PipelineRun is needed.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the tektoncd-catalog/kaniko repository to a newer Tekton Pipelines API and aligns the repo layout/tooling with other catalog repos by adding generated StepAction artifacts, e2e coverage, and release automation.

Changes:

  • Updated the kaniko Task to tekton.dev/v1, switched to ghcr.io/osscontainertools/kaniko, and added multi-arch metadata plus parameterization updates.
  • Added a generated StepAction plus generator scripts to keep Task and StepAction in sync.
  • Introduced e2e test runners and repository scaffolding (docs, OWNERS, license, release tooling, ArtifactHub metadata).

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
test/e2e-tests.sh Adds an e2e runner that installs Tekton, installs the Task, and runs a validating build via a PipelineRun.
test/e2e-bundle-test.sh Adds an e2e runner that pushes a bundle and validates bundle-resolver execution.
task/kaniko/tests/run.yaml Removes legacy v1beta1 test Pipeline/PipelineRun manifests.
task/kaniko/tests/resources.yaml Removes legacy PVC test resource.
task/kaniko/tests/pre-apply-task-hook.sh Removes legacy pre-apply hook logic (sidecar registry + git-clone injection).
task/kaniko/README.md Refreshes Task documentation for the new API/image and streamlined usage/auth docs.
task/kaniko/kaniko.yaml Modernizes the Task to v1, updates executor image/defaults, and adjusts parameters/args/env.
task/artifacthub-repo.yaml Adds ArtifactHub repository metadata for the Task.
stepaction/kaniko/README.md Adds generated StepAction documentation derived from the Task.
stepaction/kaniko/kaniko.yaml Adds the generated StepAction YAML (source-of-truth is the Task + generator).
stepaction/artifacthub-repo.yaml Adds ArtifactHub repository metadata for the StepAction.
README.md Adds top-level repository README with installation and links to docs.
OWNERS Adds Prow OWNERS configuration for approvals/merges.
LICENSE Adds Apache 2.0 license text.
hack/release.sh Adds a release automation script (version bump, regenerate, commit, tag, push).
hack/generate-stepaction.sh Adds a wrapper to run the StepAction generator.
hack/generate-stepaction.py Adds generator logic to derive StepAction YAML from the Task YAML.
DEVELOPMENT.md Documents repo architecture, generation flow, testing, and release process.
CONTRIBUTING.md Adds contribution workflow and CI expectations.
AGENTS.md Adds agent guidance emphasizing Task-as-source-of-truth and StepAction generation rules.
.gitignore Ignores the signing key path used by release/bundle signing workflows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/e2e-tests.sh Outdated
kubectl expose pod registry --port=5000

echo "--- Creating test TaskRun"
cat <<'EOF' | kubectl apply -f -
Comment thread task/kaniko/kaniko.yaml
Comment thread task/kaniko/README.md Outdated
| `CONTEXT` | The build context used by Kaniko. | `./` |
| `EXTRA_ARGS` | Additional args to pass to the Kaniko executor. | `[]` |
| `BUILDER_IMAGE` | The Kaniko executor image to use. | `ghcr.io/osscontainertools/kaniko:v1.27.6` |
| `KANIKO_DIR` | Specifies the location of the kaniko binaries. | `/kaniko` |
Comment thread stepaction/kaniko/README.md Outdated
| `CONTEXT` | The build context used by Kaniko. | `./` |
| `EXTRA_ARGS` | Additional args to pass to the Kaniko executor. | `[]` |
| `BUILDER_IMAGE` | The Kaniko executor image to use. | `ghcr.io/osscontainertools/kaniko:v1.27.6` |
| `KANIKO_DIR` | Specifies the location of the kaniko binaries. | `/kaniko` |
Comment thread hack/generate-stepaction.py
Comment thread stepaction/kaniko/kaniko.yaml
Comment thread stepaction/kaniko/kaniko.yaml
Comment thread task/kaniko/kaniko.yaml Outdated
name: kaniko
labels:
app.kubernetes.io/version: "0.6"
app.kubernetes.io/version: "0.1"
Comment thread stepaction/kaniko/kaniko.yaml Outdated
metadata:
name: kaniko
labels:
app.kubernetes.io/version: "0.1"
Comment thread hack/generate-stepaction.py
- KANIKO_DIR is the kaniko working directory, not binaries location
- Docker config path uses ${KANIKO_DIR}/.docker (respects override)
- Executor binary hardcoded to /kaniko/executor (image-determined)
- Version label aligned to semver 0.1.0 (matching git-clone/golang)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
@vdemeester

Copy link
Copy Markdown
Member Author

Addressed the Copilot review feedback in 8601c1c:

Valid points fixed:

  • KANIKO_DIR description corrected — it's the kaniko working directory (buildcontext, stages, layers, caches, docker config), not a binary location. Verified against pkg/config/init.go.
  • Docker config in the StepAction now uses ${KANIKO_DIR}/.docker instead of hardcoded /kaniko/.docker (matches DockerConfigDir = KanikoDir + "/.docker/" in kaniko source).
  • Executor binary path hardcoded to /kaniko/executorKanikoExeDir is determined by os.Executable() (where the binary lives in the image), not KANIKO_DIR. So ${KANIKO_DIR}/executor would break if KANIKO_DIR is overridden.
  • Version label aligned to 0.1.0 (three-component semver, matching git-clone and golang repos).

Already fixed in previous commit:

  • Dead TaskRun with invalid stepTemplate/volumes fields removed from e2e test.

Not changing:

  • Task dockerconfig workspace mountPath stays hardcoded /kaniko/.dockermountPath doesn't support param substitution, and PR #1385 upstream uses the same approach.

@vdemeester
vdemeester merged commit 41a498d into tektoncd-catalog:main Jul 3, 2026
8 checks passed
@vdemeester
vdemeester deleted the modernize-kaniko branch July 3, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants