cluster

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package cluster implements backend.Backend by submitting PipelineRuns to a real Tekton install on a local Kubernetes cluster (k3d).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

func New

func New(opt Options) *Backend

New is the production constructor: it does not connect — Prepare lazily ensures the cluster, installs Tekton, and builds the kube clients.

func NewWithClients

func NewWithClients(cb ClientBundle) *Backend

NewWithClients is a test constructor that injects a pre-built ClientBundle.

func (*Backend) BuildPipelineRunObject

func (b *Backend) BuildPipelineRunObject(in backend.PipelineRunInvocation, namespace string) (any, error)

BuildPipelineRunObject constructs the PipelineRun unstructured (exposed for unit-test inspection).

func (*Backend) Cleanup

func (b *Backend) Cleanup(_ context.Context) error

Cleanup is a no-op: cluster + namespaces persist for inspection.

func (*Backend) Prepare

func (b *Backend) Prepare(ctx context.Context, _ backend.RunSpec) error

Prepare lazily provisions the cluster + Tekton on first use.

func (*Backend) RunPipeline

func (*Backend) RunTask

RunTask delegates to RunPipeline by wrapping the single TaskRun call into a trivial one-task pipeline. The engine should prefer RunPipeline directly.

type ClientBundle

type ClientBundle struct {
	Dynamic dynamic.Interface
	Kube    kubernetes.Interface
	Apiext  apiextclient.Interface
}

type Options

type Options struct {
	CacheDir      string // base path for kubeconfig and other state
	Driver        cluster.Driver
	Runner        cmdrunner.Runner
	TektonVersion string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL