Skip to content

❇️ Install Buildpacks for Tekton - #379

Merged
cwiklik merged 5 commits into
rossoctl:mainfrom
cwiklik:install-buildpacks-for-tekton
Nov 4, 2025
Merged

cwiklik merged 5 commits into
rossoctl:mainfrom
cwiklik:install-buildpacks-for-tekton

Conversation

@cwiklik

@cwiklik cwiklik commented Nov 4, 2025 •

Copy link
Copy Markdown
Contributor

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

  1. Enable Step Actions Feature Flag
    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"}}'
]
  1. Install Buildpacks Phases Task

Installs the official Tekton buildpacks-phases task from the Tekton Catalog into each agent namespace defined in AGENT_NAMESPACES:

buildpacks_url = f"https://raw.githubusercontent.com/tektoncd/catalog/main/task/buildpacks-phases/{config.BUILDPACKS_VERSION}/buildpacks-phases.yaml"

for ns in agent_namespaces:
    run_command(
        ["kubectl", "apply", "--filename", buildpacks_url, "--namespace", ns],
        f"Installing Tekton Buildpacks Phases in namespace {ns}"
    )

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 warning

Related issue(s)

Fixes #349

@cwiklik
cwiklik marked this pull request as draft November 4, 2025 14:30
@cwiklik
cwiklik marked this pull request as ready for review November 4, 2025 15:25
Jarek Cwiklik added 4 commits November 4, 2025 13:34
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]>
@cwiklik
cwiklik force-pushed the install-buildpacks-for-tekton branch from a385070 to 19d2e3e Compare November 4, 2025 18:34
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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

comment seems inconsistent with the IfNotPresent policy

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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."""

Copilot AI Nov 4, 2025

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Signed-off-by: Jarek Cwiklik <[email protected]>

@pdettori pdettori left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@cwiklik
cwiklik merged commit 4ca2a9b into rossoctl:main Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: Modify Kagenti Installer to Support Buildpacks for Tekton

3 participants