fluxrender

package
v0.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: GPL-3.0 Imports: 22 Imported by: 0

README

Flux rendering cache boundaries

Each OpenRender creates a fresh session. Helm desired output is memoized within that session by the release spec, its selected valuesFrom data keys, the chart source spec, and the resolved Git chart path. This memo survives host sweeps, so random-valued Helm templates converge within an evaluation. Independent sessions render independently, preserving permadiff detection. Reconciliation status, unrelated metadata, and unused values keys do not invalidate desired output. Target histories are bounded and removed when the target disappears. Local chart paths are treated as stable source snapshots during a session; changed source trees should open a fresh session.

Acquisition has a separate boundary. An explicit OpenRequest.RunID pins mutable Git branches/tags and Helm version ranges/tags for one preview run. Before/head and normalization sessions can share that run's acquired artifacts without sharing desired output. The service retains at most one named acquisition epoch. A different run resets its repositories and chart-selector cache once the old run has no active sessions; overlapping different named runs are rejected. Without a RunID, a session receives private acquisition caches that are removed on CloseRender.

This bounds retained selector state without a process-wide cache that freezes mutable selectors forever. The tradeoff is that a new run may reacquire Git repositories and re-resolve chart selectors; Helm's content-addressed disk cache can still reuse immutable chart archives. The last named epoch remains available between sequential sessions and is released on the next run or Service.Close.

Documentation

Overview

Package fluxrender implements the persistent Flux rendering plugin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// FluxKS defaults to enabled. The optional switch preserves the legacy host's
	// explicit WithFluxKS setting without requiring it in neutral invocations.
	FluxKS       *bool        `json:"fluxKS,omitempty"`
	Helm         bool         `json:"helm"`
	ResolveGit   bool         `json:"resolveGit"`
	HelmSettings HelmSettings `json:"helmSettings"`
}

Config is trusted, engine-specific configuration supplied at OpenRender.

type HelmSettings

type HelmSettings struct {
	RegistryConfig   string `json:"RegistryConfig"`
	RepositoryConfig string `json:"RepositoryConfig"`
	RepositoryCache  string `json:"RepositoryCache"`
}

HelmSettings contains acquisition settings, independent of Helm's CLI types.

type Service

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

Service retains one explicit run's acquisition caches. Calls are serialized so resetting a run or closing cannot remove repositories during a build.

func New

func New(log logr.Logger) (*Service, error)

New creates a service. Acquisition caches are allocated lazily per run.

func (*Service) Close

func (s *Service) Close() error

Close releases shared repositories after active calls finish. It is idempotent.

func (*Service) CloseRender

func (s *Service) CloseRender(ctx context.Context, req *plugin.CloseRequest) (*plugin.CloseResponse, error)

func (*Service) Describe

func (*Service) Expand

func (*Service) OpenRender

func (s *Service) OpenRender(ctx context.Context, req *plugin.OpenRequest) (*plugin.OpenResponse, error)

Jump to

Keyboard shortcuts

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