Repository navigation
❇️ Install Buildpacks for Tekton - #379
Conversation
Signed-off-by: Jarek Cwiklik <[email protected]>
Signed-off-by: Jarek Cwiklik <[email protected]>
Signed-off-by: Jarek Cwiklik <[email protected]>
Signed-off-by: Jarek Cwiklik <[email protected]>
a385070 to
19d2e3e
Compare
| if image_registry_prefix: | ||
| image_spec["imageRegistry"] = image_registry_prefix | ||
| image_spec["imagePullPolicy"] = image_pull_policy | ||
| # Local cluster registry - never pull (image is already there) |
There was a problem hiding this comment.
comment seems inconsistent with the IfNotPresent policy
There was a problem hiding this comment.
Pull Request Overview
This PR updates image pull policies and adds Tekton buildpacks support for the kagenti platform. The changes improve local development experience by adjusting Kubernetes image pull behaviors and extend Tekton installation to include buildpacks capabilities.
- Changed image pull policy from "Never" to "IfNotPresent" for local images
- Added special handling for local cluster registry images
- Integrated Tekton buildpacks installation with configurable namespaces
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| kagenti/ui/lib/build_utils.py | Updated image pull policies to use "IfNotPresent" instead of "Never" for local images and added special handling for cluster-local registry |
| kagenti/installer/app/config.py | Added BUILDPACKS_VERSION constant to configure buildpacks task version |
| kagenti/installer/app/components/tekton.py | Extended Tekton installation to enable step actions and install buildpacks phases across agent namespaces |
Comments suppressed due to low confidence (1)
kagenti/ui/lib/build_utils.py:511
- The docstring states that local images use 'Never' policy, but the code now uses 'IfNotPresent' at line 541. The documentation should be updated to reflect the actual behavior.
For local images (no registry), sets imagePullPolicy to "Never" to prevent
pull attempts.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ) | ||
| return | ||
|
|
||
| """Installs buildpacks phases for Tekton.""" |
There was a problem hiding this comment.
This docstring appears mid-function at line 49, after the early return condition. It should either be moved to line 21 as part of the main function's docstring or removed, as it creates confusion about the function's scope.
Signed-off-by: Jarek Cwiklik <[email protected]>
Summary
Adds Cloud Native Buildpacks (CNB) support to the Tekton installer by enabling step actions and installing buildpacks-phases task across agent namespaces. The CNB major feature is ability to build container images without a Dockerfile present in a user code.
Changes
Patches the Tekton Pipelines feature-flags ConfigMap to enable step actions, which are required for buildpacks functionality:
pythonpatch = [ "kubectl", "patch", "configmap", "feature-flags", "-n", "tekton-pipelines", "--type", "merge", "-p", '{"data":{"enable-step-actions":"true"}}' ]Installs the official Tekton buildpacks-phases task from the Tekton Catalog into each agent namespace defined in AGENT_NAMESPACES:
Required Environment Variable
AGENT_NAMESPACES: Comma-separated list of namespaces where agents will run
Example: AGENT_NAMESPACES="kagenti,production,staging" If not set, buildpacks installation is skipped with a warningRelated issue(s)
Fixes #349