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.