api

package
v1.12.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Overview

Package api holds the leaf types and injection seam shared between the render-only addon service and the CueX addon provider. It imports only the standard library so neither the provider nor the CueX compiler pulls in pkg/addon (which would create an import cycle).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefaultRenderer

func SetDefaultRenderer(r Renderer)

SetDefaultRenderer installs the process-wide renderer (called once at startup).

Types

type AddonRequest

type AddonRequest struct {
	Name       string
	Version    string
	Registry   string
	Properties map[string]interface{}
	// SkipVersionValidate skips the addon SystemRequirements (vela/kubernetes
	// version) compatibility check before rendering.
	SkipVersionValidate bool
	// Namespace is the namespace of the Application that installs the addon,
	// captured where the type: addon component renders. The owned addon
	// Application always lives in vela-system, so this is the only record of
	// where the addon's modules install their definitions.
	Namespace string
}

AddonRequest is the resolved input for rendering one addon.

type AddonResult

type AddonResult struct {
	ResolvedVersion string
	Registry        string
	Application     map[string]interface{}
}

AddonResult is the rendered output: the addon Application (with its auxiliaries folded in as components) as a generic map, ready to hand back to CUE.

type Renderer

type Renderer interface {
	RenderAddon(ctx context.Context, req AddonRequest) (*AddonResult, error)
}

Renderer resolves and renders an addon without dispatching it to the cluster.

func DefaultRenderer

func DefaultRenderer() Renderer

DefaultRenderer returns the installed renderer, or nil if startup has not wired one.

Jump to

Keyboard shortcuts

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