feat: modernize kaniko repo on par with git-clone and golang - #2
Conversation
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
- 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>
27e4564 to
aa012e4
Compare
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>
There was a problem hiding this comment.
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 toghcr.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.
| kubectl expose pod registry --port=5000 | ||
|
|
||
| echo "--- Creating test TaskRun" | ||
| cat <<'EOF' | kubectl apply -f - |
| | `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` | |
| | `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` | |
| name: kaniko | ||
| labels: | ||
| app.kubernetes.io/version: "0.6" | ||
| app.kubernetes.io/version: "0.1" |
| metadata: | ||
| name: kaniko | ||
| labels: | ||
| app.kubernetes.io/version: "0.1" |
- 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>
|
Addressed the Copilot review feedback in 8601c1c: Valid points fixed:
Already fixed in previous commit:
Not changing:
|
Changes
Modernize the kaniko repository to match the structure and quality of the
git-cloneandgolangrepos intektoncd-catalog.Task modernization:
tekton.dev/v1beta1totekton.dev/v1APIGoogleContainerTools/kaniko(v1.5.1) to the community-maintained forkosscontainertools/kaniko(v1.27.6)linux/amd64,linux/arm64,linux/ppc64leKANIKO_DIRparam for bootstrapping kaniko with itselfEXTRA_ARGSarray expansion ($(params.EXTRA_ARGS[*]))StepAction:
stepaction/kaniko/kaniko.yaml(generated from the Task, never edited directly)hack/generate-stepaction.py) converts workspaces to params (source→source-path,dockerconfig→dockerconfig-path)CI/CD:
build.yaml: lint (YAML validation + StepAction sync check) + e2e matrix across 4 Tekton Pipelines LTS versions + bundle e2erelease.yaml: tag-triggered Tekton bundle publish toghcr.io/tektoncd-catalog/kanikoRepository scaffolding:
hack/release.sh)Tests:
Reference: tektoncd/catalog PR #1385 for the kaniko fork context.
Submitter Checklist
Release Notes