stack

package
v1.0.9 Latest Latest
Warning

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

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

Documentation

Overview

Package stack implements torque stack: filesystem discovery, hierarchical merge, selection, DAG planning, and orchestration that reuses the existing deploy engine.

Index

Constants

View Source
const (
	NodeKindHelm              = "release.helm"
	NodeKindAction            = "action.script"
	NodeKindActionPlugin      = "action.plugin"
	NodeKindDBRestorePoint    = "db.restore-point"
	NodeKindDBSchemaExpand    = "db.schema-expand"
	NodeKindDBBackfill        = "db.backfill"
	NodeKindDBVerify          = "db.verify"
	NodeKindDBCutover         = "db.cutover"
	NodeKindDBSchemaContract  = "db.schema-contract"
	NodeKindHostCommandRun    = "host.command.run"
	NodeKindK8sClusterInspect = "k8s.cluster.inspect"
	NodeKindK8sCertInspect    = "k8s.cert.inspect"
	NodeKindK8sCertRenew      = "k8s.cert.renew"
	NodeKindK8sClusterVerify  = "k8s.cluster.verify"
)

Variables

This section is empty.

Functions

func ApplyInputBundleToPlan

func ApplyInputBundleToPlan(p *Plan, bundleRoot string, manifest *InputBundleManifest) error

func ComputeExecutionOrder

func ComputeExecutionOrder(p *Plan, command string) ([]string, error)

ComputeExecutionOrder returns a deterministic topological order for the plan. It uses the same ready-set priority as the runtime scheduler.

func ComputeRunPlanHash

func ComputeRunPlanHash(p *RunPlan) (string, error)

ComputeRunPlanHash returns a stable sha256 hash of the run plan content. The hash is computed over the JSON form with PlanHash itself cleared.

func DriftReport

func DriftReport(p *Plan) ([]string, error)

func ExportRunBundle

func ExportRunBundle(ctx context.Context, root string, runID string, outPath string) (string, error)

func ExtractBundleToTempDir

func ExtractBundleToTempDir(bundlePath string) (string, error)

func GitChangedFiles

func GitChangedFiles(root string, gitRange string) ([]string, error)

func InferDependencies

func InferDependencies(ctx context.Context, p *Plan, defaultKubeconfig string, defaultKubeContext string, opts InferDepsOptions) error

InferDependencies renders each release client-side and infers additional Needs edges between releases in the same cluster. The inference is deterministic for identical inputs (chart+values+set+helm version) because it runs with UseCluster=false.

func LoadMostRecentRun

func LoadMostRecentRun(root string) (string, error)

func LoadRunNodeSteps

func LoadRunNodeSteps(root string, runID string) (map[string]map[int]map[string]NodeStepCheckpoint, error)

LoadRunNodeSteps loads per-node step checkpoints for a run from the sqlite state store.

func PrintGraphDOT

func PrintGraphDOT(w io.Writer, p *Plan) error

func PrintGraphMermaid

func PrintGraphMermaid(w io.Writer, p *Plan) error

func PrintPlanTable

func PrintPlanTable(w io.Writer, p *Plan) error

func PrintRunAuditHTML

func PrintRunAuditHTML(w io.Writer, a *RunAudit) error

func PrintRunAuditTable

func PrintRunAuditTable(w io.Writer, a *RunAudit) error

func PrintRunStatusTable

func PrintRunStatusTable(w io.Writer, runID string, s *RunSummary) error

func PrintRunsTable

func PrintRunsTable(w io.Writer, runs []RunIndexEntry) error

func RecomputeExecutionGroups

func RecomputeExecutionGroups(p *Plan) error

RecomputeExecutionGroups recalculates execution groups after mutating dependencies.

func Run

func Run(ctx context.Context, opts RunOptions, out io.Writer, errOut io.Writer) error

func RunStatus

func RunStatus(ctx context.Context, opts StatusOptions, out io.Writer) error

func ValidateHooksConfig

func ValidateHooksConfig(cfg StackHooksConfig, allowRunOnce bool, where string) error

func ValidateRunnerResolved

func ValidateRunnerResolved(r RunnerResolved) error

func VerifyBundleIntegrity

func VerifyBundleIntegrity(bundlePath string) error

VerifyBundleIntegrity checks the hashes in manifest.json (if present) without requiring a signature.

func VerifyRunEventChain

func VerifyRunEventChain(events []RunEvent) error

VerifyRunEventChain checks the per-event digest/crc chain produced by computeRunEventIntegrity. If the chain is absent (digest/crc empty on the first event), it returns nil for backward compatibility.

func WriteStackPlanBundle

func WriteStackPlanBundle(outPath string, planJSON []byte, attestationJSON []byte, inputsPath string, inputsManifestJSON []byte, diffSummaryJSON []byte, manifest StackPlanBundleManifest) (string, error)

Types

type APIVersionKind

type APIVersionKind struct {
	APIVersion string `yaml:"apiVersion,omitempty" json:"apiVersion,omitempty"`
	Kind       string `yaml:"kind,omitempty" json:"kind,omitempty"`
}

type ActionPluginSpec added in v1.0.9

type ActionPluginSpec struct {
	Command []string          `yaml:"command,omitempty" json:"command,omitempty"`
	Env     map[string]string `yaml:"env,omitempty" json:"env,omitempty"`
	WorkDir string            `yaml:"workDir,omitempty" json:"workDir,omitempty"`
	Timeout *time.Duration    `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	Phases  []string          `yaml:"phases,omitempty" json:"phases,omitempty"`
	Config  map[string]any    `yaml:"config,omitempty" json:"config,omitempty"`
}

type ActionSpec added in v1.0.9

type ActionSpec struct {
	Idempotent bool              `yaml:"idempotent,omitempty" json:"idempotent,omitempty"`
	Apply      *ScriptHookConfig `yaml:"apply,omitempty" json:"apply,omitempty"`
	Delete     *ScriptHookConfig `yaml:"delete,omitempty" json:"delete,omitempty"`
	Plugin     *ActionPluginSpec `yaml:"plugin,omitempty" json:"plugin,omitempty"`
}

type AdaptiveConcurrency

type AdaptiveConcurrency struct {
	Target int
	Max    int
	Min    int
	// contains filtered or unexported fields
}

func NewAdaptiveConcurrency

func NewAdaptiveConcurrency(max int) *AdaptiveConcurrency

func NewAdaptiveConcurrencyWithOptions

func NewAdaptiveConcurrencyWithOptions(max int, opts AdaptiveConcurrencyOptions) *AdaptiveConcurrency

func (*AdaptiveConcurrency) OnFailure

func (a *AdaptiveConcurrency) OnFailure(class string) (changed bool, reason string)

func (*AdaptiveConcurrency) OnSuccess

func (a *AdaptiveConcurrency) OnSuccess() (changed bool, reason string)

func (*AdaptiveConcurrency) SnapshotString

func (a *AdaptiveConcurrency) SnapshotString() string

type AdaptiveConcurrencyOptions

type AdaptiveConcurrencyOptions struct {
	Min int

	// WindowSize controls how many recent outcomes influence shrink/ramp.
	WindowSize int

	// RampAfterSuccesses controls how many clean successes are required before
	// increasing concurrency by 1.
	RampAfterSuccesses int

	// RampMaxFailureRate blocks ramp-up when the recent failure rate exceeds this.
	RampMaxFailureRate float64

	// CooldownSuccessesByClass controls how many subsequent successes must pass
	// (without ramping) after a failure of a given class.
	CooldownSuccessesByClass map[string]int
}

type ApplyCacheDecision

type ApplyCacheDecision struct {
	Skip           bool
	CacheHit       bool
	Reason         string
	DesiredDigest  string
	ObservedDigest string
	HasHooks       bool
}

func CheckApplyCache

func CheckApplyCache(ctx context.Context, store *stackStateStore, key ApplyCacheKey, runID string, computeDesired applyCacheDesiredFunc, computeObserved applyCacheObservedFunc) (ApplyCacheDecision, error)

type ApplyCacheEntry

type ApplyCacheEntry struct {
	DesiredDigest string
	HasHooks      bool
	LastRunID     string
	UpdatedAtNS   int64
}

type ApplyCacheKey

type ApplyCacheKey struct {
	ClusterKey         string
	Namespace          string
	ReleaseName        string
	Command            string
	EffectiveInputHash string
}

type ApplyOptions

type ApplyOptions struct {
	Atomic          *bool          `yaml:"atomic,omitempty" json:"atomic,omitempty"`
	Timeout         *time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	Wait            *bool          `yaml:"wait,omitempty" json:"wait,omitempty"`
	CreateNamespace *bool          `yaml:"createNamespace,omitempty" json:"createNamespace,omitempty"`
}

type BackfillSpec added in v1.0.9

type BackfillSpec struct {
	CheckpointTable string         `yaml:"checkpointTable,omitempty" json:"checkpointTable,omitempty"`
	CheckpointKey   string         `yaml:"checkpointKey,omitempty" json:"checkpointKey,omitempty"`
	StartSQL        string         `yaml:"startSQL,omitempty" json:"startSQL,omitempty"`
	EndSQL          string         `yaml:"endSQL,omitempty" json:"endSQL,omitempty"`
	BatchSQL        string         `yaml:"batchSQL,omitempty" json:"batchSQL,omitempty"`
	BatchSize       int64          `yaml:"batchSize,omitempty" json:"batchSize,omitempty"`
	BatchSleep      *time.Duration `yaml:"batchSleep,omitempty" json:"batchSleep,omitempty"`
	MaxBatches      int            `yaml:"maxBatches,omitempty" json:"maxBatches,omitempty"`
}

type BudgetWaitFields

type BudgetWaitFields struct {
	BudgetType string
	BudgetKey  string
	Limit      int64
	Used       int64
}

func (BudgetWaitFields) Map

func (f BudgetWaitFields) Map() map[string]any

type BundleKey

type BundleKey struct {
	APIVersion string `json:"apiVersion"`
	Type       string `json:"type"` // ed25519
	PublicKey  string `json:"publicKey"`
	// PrivateKey is base64 of ed25519.PrivateKey (64 bytes).
	PrivateKey string `json:"privateKey,omitempty"`
	// Seed is base64 of 32-byte seed (optional alternative).
	Seed string `json:"seed,omitempty"`
}

func GenerateEd25519Key

func GenerateEd25519Key() (*BundleKey, error)

func LoadBundleKey

func LoadBundleKey(path string) (*BundleKey, ed25519.PublicKey, ed25519.PrivateKey, error)

type BundleMissingNodeError

type BundleMissingNodeError struct {
	NodeID string
}

func (*BundleMissingNodeError) Error

func (e *BundleMissingNodeError) Error() string

type BundleSignature

type BundleSignature struct {
	APIVersion     string `json:"apiVersion"`
	CreatedAt      string `json:"createdAt"`
	Algorithm      string `json:"algorithm"` // ed25519
	PublicKey      string `json:"publicKey"`
	ManifestSHA256 string `json:"manifestSha256"`
	Signature      string `json:"signature"`
}

func SignBundle

func SignBundle(bundlePath string, priv ed25519.PrivateKey) (*BundleSignature, error)

func VerifyBundle

func VerifyBundle(bundlePath string, trustedPub ed25519.PublicKey) (*BundleSignature, error)

type ClusterTarget

type ClusterTarget struct {
	Name       string `yaml:"name,omitempty" json:"name,omitempty"`
	Kubeconfig string `yaml:"kubeconfig,omitempty" json:"kubeconfig,omitempty"`
	Context    string `yaml:"context,omitempty" json:"context,omitempty"`
}

type CompileOptions

type CompileOptions struct {
	Profile string
}

type ConcurrencyFields

type ConcurrencyFields struct {
	From     int
	To       int
	Reason   string
	Class    string
	Window   int
	FailRate float64
}

func (ConcurrencyFields) Map

func (f ConcurrencyFields) Map() map[string]any

type DatabaseSpec added in v1.0.9

type DatabaseSpec struct {
	Driver              string         `yaml:"driver,omitempty" json:"driver,omitempty"`
	DSN                 string         `yaml:"dsn,omitempty" json:"-"`
	DSNEnv              string         `yaml:"dsnEnv,omitempty" json:"dsnEnv,omitempty"`
	MetadataTable       string         `yaml:"metadataTable,omitempty" json:"metadataTable,omitempty"`
	RestorePointSQL     string         `yaml:"restorePointSQL,omitempty" json:"restorePointSQL,omitempty"`
	ExpandSQL           string         `yaml:"expandSQL,omitempty" json:"expandSQL,omitempty"`
	ContractSQL         string         `yaml:"contractSQL,omitempty" json:"contractSQL,omitempty"`
	PrepareSQL          string         `yaml:"prepareSQL,omitempty" json:"prepareSQL,omitempty"`
	ArmSQL              string         `yaml:"armSQL,omitempty" json:"armSQL,omitempty"`
	CommitSQL           string         `yaml:"commitSQL,omitempty" json:"commitSQL,omitempty"`
	VerifySQL           string         `yaml:"verifySQL,omitempty" json:"verifySQL,omitempty"`
	FinalizeSQL         string         `yaml:"finalizeSQL,omitempty" json:"finalizeSQL,omitempty"`
	VerifyExpectMessage string         `yaml:"verifyExpectMessage,omitempty" json:"verifyExpectMessage,omitempty"`
	StabilizationWindow *time.Duration `yaml:"stabilizationWindow,omitempty" json:"stabilizationWindow,omitempty"`
	RequireFencing      *bool          `yaml:"requireFencing,omitempty" json:"requireFencing,omitempty"`
	AmbiguityPolicy     string         `yaml:"ambiguityPolicy,omitempty" json:"ambiguityPolicy,omitempty"`
	Backfill            BackfillSpec   `yaml:"backfill,omitempty" json:"backfill,omitempty"`
}

type DeleteOptions

type DeleteOptions struct {
	Timeout *time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`
}

type EffectiveActionInput added in v1.0.9

type EffectiveActionInput struct {
	Idempotent   bool   `json:"idempotent"`
	ApplyDigest  string `json:"applyDigest,omitempty"`
	DeleteDigest string `json:"deleteDigest,omitempty"`
	PluginDigest string `json:"pluginDigest,omitempty"`
	Digest       string `json:"digest,omitempty"`
}

type EffectiveApplyInput

type EffectiveApplyInput struct {
	Atomic          bool   `json:"atomic"`
	Wait            bool   `json:"wait"`
	CreateNamespace bool   `json:"createNamespace"`
	Timeout         string `json:"timeout"`
	Digest          string `json:"digest,omitempty"`
}

type EffectiveBackfillInput added in v1.0.9

type EffectiveBackfillInput struct {
	CheckpointTable string `json:"checkpointTable,omitempty"`
	CheckpointKey   string `json:"checkpointKey,omitempty"`
	StartDigest     string `json:"startDigest,omitempty"`
	EndDigest       string `json:"endDigest,omitempty"`
	BatchDigest     string `json:"batchDigest,omitempty"`
	BatchSize       int64  `json:"batchSize,omitempty"`
	BatchSleep      string `json:"batchSleep,omitempty"`
	MaxBatches      int    `json:"maxBatches,omitempty"`
}

type EffectiveChartInput

type EffectiveChartInput struct {
	Ref             string `json:"ref"`
	Version         string `json:"version,omitempty"`
	ResolvedVersion string `json:"resolvedVersion,omitempty"`
	Digest          string `json:"digest,omitempty"`
}

type EffectiveDatabaseInput added in v1.0.9

type EffectiveDatabaseInput struct {
	Driver              string                 `json:"driver,omitempty"`
	DSNRef              string                 `json:"dsnRef,omitempty"`
	MetadataTable       string                 `json:"metadataTable,omitempty"`
	RestorePointDigest  string                 `json:"restorePointDigest,omitempty"`
	ExpandDigest        string                 `json:"expandDigest,omitempty"`
	ContractDigest      string                 `json:"contractDigest,omitempty"`
	PrepareDigest       string                 `json:"prepareDigest,omitempty"`
	ArmDigest           string                 `json:"armDigest,omitempty"`
	CommitDigest        string                 `json:"commitDigest,omitempty"`
	VerifyDigest        string                 `json:"verifyDigest,omitempty"`
	FinalizeDigest      string                 `json:"finalizeDigest,omitempty"`
	VerifyExpectMessage string                 `json:"verifyExpectMessage,omitempty"`
	Backfill            EffectiveBackfillInput `json:"backfill,omitempty"`
	StabilizationWindow string                 `json:"stabilizationWindow,omitempty"`
	RequireFencing      bool                   `json:"requireFencing,omitempty"`
	AmbiguityPolicy     string                 `json:"ambiguityPolicy,omitempty"`
	Digest              string                 `json:"digest,omitempty"`
}

type EffectiveDeleteInput

type EffectiveDeleteInput struct {
	Timeout string `json:"timeout"`
	Digest  string `json:"digest,omitempty"`
}

type EffectiveHostInput added in v1.0.9

type EffectiveHostInput struct {
	Transport     string `json:"transport,omitempty"`
	TargetDigest  string `json:"targetDigest,omitempty"`
	TargetEnv     string `json:"targetEnv,omitempty"`
	CommandDigest string `json:"commandDigest,omitempty"`
	DeleteDigest  string `json:"deleteDigest,omitempty"`
	Timeout       string `json:"timeout,omitempty"`
	Digest        string `json:"digest,omitempty"`
}

type EffectiveInput

type EffectiveInput struct {
	APIVersion string `json:"apiVersion"`

	StackGitCommit string `json:"stackGitCommit,omitempty"`
	StackGitDirty  bool   `json:"stackGitDirty,omitempty"`

	TorqueVersion   string `json:"torqueVersion,omitempty"`
	TorqueGitCommit string `json:"torqueGitCommit,omitempty"`

	NodeID string `json:"nodeId"`
	Kind   string `json:"kind,omitempty"`

	Chart EffectiveChartInput `json:"chart"`

	Values []FileDigest `json:"values,omitempty"`

	SetDigest        string `json:"setDigest,omitempty"`
	ClusterDigest    string `json:"clusterDigest,omitempty"`
	ActionDigest     string `json:"actionDigest,omitempty"`
	DatabaseDigest   string `json:"databaseDigest,omitempty"`
	HostDigest       string `json:"hostDigest,omitempty"`
	KubernetesDigest string `json:"kubernetesDigest,omitempty"`

	Apply  EffectiveApplyInput  `json:"apply"`
	Delete EffectiveDeleteInput `json:"delete"`
	Verify EffectiveVerifyInput `json:"verify"`
}

func ComputeEffectiveInputHash

func ComputeEffectiveInputHash(stackRoot string, n *ResolvedRelease, includeValuesContents bool) (string, *EffectiveInput, error)

func ComputeEffectiveInputHashWithOptions

func ComputeEffectiveInputHashWithOptions(n *ResolvedRelease, opts EffectiveInputHashOptions) (string, *EffectiveInput, error)

type EffectiveInputHashOptions

type EffectiveInputHashOptions struct {
	StackRoot             string
	IncludeValuesContents bool
	StackGitIdentity      *GitIdentity
}

type EffectiveKubernetesInput added in v1.0.9

type EffectiveKubernetesInput struct {
	Provider            string   `json:"provider,omitempty"`
	ClusterDigest       string   `json:"clusterDigest,omitempty"`
	TargetDigests       []string `json:"targetDigests,omitempty"`
	RenewBefore         string   `json:"renewBefore,omitempty"`
	Force               bool     `json:"force,omitempty"`
	ForceOnceID         string   `json:"forceOnceId,omitempty"`
	StatePathDigest     string   `json:"statePathDigest,omitempty"`
	Services            []string `json:"services,omitempty"`
	Order               string   `json:"order,omitempty"`
	BatchSize           int      `json:"batchSize,omitempty"`
	HealthDigest        string   `json:"healthDigest,omitempty"`
	VerifyCommandDigest string   `json:"verifyCommandDigest,omitempty"`
	PolicyDigest        string   `json:"policyDigest,omitempty"`
	Digest              string   `json:"digest,omitempty"`
}

type EffectiveVerifyInput

type EffectiveVerifyInput struct {
	Enabled           bool                         `json:"enabled"`
	FailOnWarnings    bool                         `json:"failOnWarnings"`
	WarnOnly          bool                         `json:"warnOnly"`
	EventsWindow      string                       `json:"eventsWindow"`
	Timeout           string                       `json:"timeout"`
	DenyReasons       []string                     `json:"denyReasons,omitempty"`
	AllowReasons      []string                     `json:"allowReasons,omitempty"`
	RequireConditions []VerifyConditionRequirement `json:"requireConditions,omitempty"`
	Digest            string                       `json:"digest,omitempty"`
}

type FailureCluster

type FailureCluster struct {
	ErrorClass     string   `json:"errorClass"`
	ErrorDigest    string   `json:"errorDigest"`
	FailedEvents   int      `json:"failedEvents"`
	AffectedNodes  int      `json:"affectedNodes"`
	ExampleNodeIDs []string `json:"exampleNodeIds,omitempty"`
}

type FileDigest

type FileDigest struct {
	Path   string `json:"path"`
	Digest string `json:"digest"`
}

type GitIdentity

type GitIdentity struct {
	Commit string
	Dirty  bool
}

func GitIdentityForRoot

func GitIdentityForRoot(root string) (GitIdentity, error)

GitIdentityForRoot returns the current git HEAD commit and whether the working tree is dirty. If root is not a git work tree, it returns an empty commit and Dirty=false.

type Graph

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

func BuildGraph

func BuildGraph(p *Plan) (*Graph, error)

func (*Graph) DependentsOf

func (g *Graph) DependentsOf(id string) []string

func (*Graph) DepsOf

func (g *Graph) DepsOf(id string) []string

func (*Graph) Edges

func (g *Graph) Edges() [][2]string

type HTTPHookConfig

type HTTPHookConfig struct {
	Method  string            `yaml:"method,omitempty" json:"method,omitempty"`
	URL     string            `yaml:"url,omitempty" json:"url,omitempty"`
	Headers map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"`
	Body    string            `yaml:"body,omitempty" json:"body,omitempty"`
}

type HookSpec

type HookSpec struct {
	Name    string         `yaml:"name,omitempty" json:"name,omitempty"`
	Type    string         `yaml:"type,omitempty" json:"type,omitempty"` // kubectl|script|http
	RunOnce bool           `yaml:"runOnce,omitempty" json:"runOnce,omitempty"`
	When    string         `yaml:"when,omitempty" json:"when,omitempty"` // success|failure|always
	Timeout *time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	Retry   *int           `yaml:"retry,omitempty" json:"retry,omitempty"` // max attempts, includes the initial attempt

	Kubeconfig string `yaml:"kubeconfig,omitempty" json:"kubeconfig,omitempty"`
	Context    string `yaml:"context,omitempty" json:"context,omitempty"`
	Namespace  string `yaml:"namespace,omitempty" json:"namespace,omitempty"`

	Kubectl *KubectlHookConfig `yaml:"kubectl,omitempty" json:"kubectl,omitempty"`
	Script  *ScriptHookConfig  `yaml:"script,omitempty" json:"script,omitempty"`
	HTTP    *HTTPHookConfig    `yaml:"http,omitempty" json:"http,omitempty"`
}

type HostCommandSpec added in v1.0.9

type HostCommandSpec struct {
	Transport     string         `yaml:"transport,omitempty" json:"transport,omitempty"`
	Target        string         `yaml:"target,omitempty" json:"target,omitempty"`
	TargetEnv     string         `yaml:"targetEnv,omitempty" json:"targetEnv,omitempty"`
	Command       string         `yaml:"command,omitempty" json:"command,omitempty"`
	DeleteCommand string         `yaml:"deleteCommand,omitempty" json:"deleteCommand,omitempty"`
	Timeout       *time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`
}

type InferDepsOptions

type InferDepsOptions struct {
	IncludeConfigRefs bool
	Secrets           *deploy.SecretOptions
}

type InferredNeed

type InferredNeed struct {
	Name    string           `json:"name"`
	Reasons []InferredReason `json:"reasons,omitempty"`
}

type InferredReason

type InferredReason struct {
	Type     string `json:"type"`
	Evidence string `json:"evidence,omitempty"`
}

type InputBundleManifest

type InputBundleManifest struct {
	APIVersion string `json:"apiVersion"`
	CreatedAt  string `json:"createdAt"`
	PlanHash   string `json:"planHash,omitempty"`

	Nodes []InputBundleNode `json:"nodes"`
}

func ExtractInputBundle

func ExtractInputBundle(ctx context.Context, bundlePath string, dstDir string) (*InputBundleManifest, error)

func WriteInputBundle

func WriteInputBundle(ctx context.Context, outPath string, planHash string, nodes []*ResolvedRelease) (*InputBundleManifest, string, error)

WriteInputBundle writes a portable .tar.gz containing the Helm chart contents and values files required by the provided nodes. The returned digest is for the compressed bundle bytes.

type InputBundleNode

type InputBundleNode struct {
	ID       string             `json:"id"`
	Kind     string             `json:"kind,omitempty"`
	ChartDir string             `json:"chartDir,omitempty"`
	Values   []InputBundleValue `json:"values,omitempty"`
}

type InputBundleValue

type InputBundleValue struct {
	OriginalPath string `json:"originalPath,omitempty"`
	BundlePath   string `json:"bundlePath"`
	Digest       string `json:"digest,omitempty"`
}

type KubectlHookConfig

type KubectlHookConfig struct {
	Args []string `yaml:"args,omitempty" json:"args,omitempty"`
}

type KubernetesAppProbe added in v1.0.9

type KubernetesAppProbe struct {
	ID      string `yaml:"id,omitempty" json:"id,omitempty"`
	Command string `yaml:"command,omitempty" json:"command,omitempty"`
	Expect  string `yaml:"expect,omitempty" json:"expect,omitempty"`
}

type KubernetesCertSpec added in v1.0.9

type KubernetesCertSpec struct {
	Targets            []KubernetesCertTarget        `yaml:"targets,omitempty" json:"targets,omitempty"`
	TargetsFrom        KubernetesCertTargetsFromSpec `yaml:"targetsFrom,omitempty" json:"targetsFrom,omitempty"`
	RenewBefore        *time.Duration                `yaml:"renewBefore,omitempty" json:"renewBefore,omitempty"`
	Force              bool                          `yaml:"force,omitempty" json:"force,omitempty"`
	ForceOnceID        string                        `yaml:"forceOnceId,omitempty" json:"forceOnceId,omitempty"`
	StatePath          string                        `yaml:"statePath,omitempty" json:"statePath,omitempty"`
	Services           []string                      `yaml:"services,omitempty" json:"services,omitempty"`
	Order              string                        `yaml:"order,omitempty" json:"order,omitempty"`
	BatchSize          int                           `yaml:"batchSize,omitempty" json:"batchSize,omitempty"`
	HealthCheckCommand string                        `yaml:"healthCheckCommand,omitempty" json:"healthCheckCommand,omitempty"`
	VerifyCommand      string                        `yaml:"verifyCommand,omitempty" json:"verifyCommand,omitempty"`
	Policy             KubernetesLifecyclePolicySpec `yaml:"policy,omitempty" json:"policy,omitempty"`
}

type KubernetesCertTarget added in v1.0.9

type KubernetesCertTarget struct {
	ID               string         `yaml:"id,omitempty" json:"id,omitempty"`
	Role             string         `yaml:"role,omitempty" json:"role,omitempty"`
	Provider         string         `yaml:"provider,omitempty" json:"provider,omitempty"`
	Transport        string         `yaml:"transport,omitempty" json:"transport,omitempty"`
	Target           string         `yaml:"target,omitempty" json:"target,omitempty"`
	TargetEnv        string         `yaml:"targetEnv,omitempty" json:"targetEnv,omitempty"`
	Timeout          *time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	Service          string         `yaml:"service,omitempty" json:"service,omitempty"`
	NodeAddress      string         `yaml:"nodeAddress,omitempty" json:"nodeAddress,omitempty"`
	NodeIdentityFile string         `yaml:"nodeIdentityFile,omitempty" json:"nodeIdentityFile,omitempty"`
	NodeSSHOptions   string         `yaml:"nodeSshOptions,omitempty" json:"nodeSshOptions,omitempty"`
	InspectCommand   string         `yaml:"inspectCommand,omitempty" json:"inspectCommand,omitempty"`
	RenewCommand     string         `yaml:"renewCommand,omitempty" json:"renewCommand,omitempty"`
	RestartCommand   string         `yaml:"restartCommand,omitempty" json:"restartCommand,omitempty"`
}

type KubernetesCertTargetsFromSpec added in v1.0.9

type KubernetesCertTargetsFromSpec struct {
	SourceNode          string         `yaml:"sourceNode,omitempty" json:"sourceNode,omitempty"`
	SourceNodeID        string         `yaml:"sourceNodeId,omitempty" json:"sourceNodeId,omitempty"`
	Artifact            string         `yaml:"artifact,omitempty" json:"artifact,omitempty"`
	Roles               []string       `yaml:"roles,omitempty" json:"roles,omitempty"`
	IncludeNotReady     bool           `yaml:"includeNotReady,omitempty" json:"includeNotReady,omitempty"`
	AddressType         string         `yaml:"addressType,omitempty" json:"addressType,omitempty"`
	Transport           string         `yaml:"transport,omitempty" json:"transport,omitempty"`
	Target              string         `yaml:"target,omitempty" json:"target,omitempty"`
	TargetEnv           string         `yaml:"targetEnv,omitempty" json:"targetEnv,omitempty"`
	TargetTemplate      string         `yaml:"targetTemplate,omitempty" json:"targetTemplate,omitempty"`
	Timeout             *time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	Provider            string         `yaml:"provider,omitempty" json:"provider,omitempty"`
	Service             string         `yaml:"service,omitempty" json:"service,omitempty"`
	NodeAddressTemplate string         `yaml:"nodeAddressTemplate,omitempty" json:"nodeAddressTemplate,omitempty"`
	NodeIdentityFile    string         `yaml:"nodeIdentityFile,omitempty" json:"nodeIdentityFile,omitempty"`
	NodeSSHOptions      string         `yaml:"nodeSshOptions,omitempty" json:"nodeSshOptions,omitempty"`
	InspectCommand      string         `yaml:"inspectCommand,omitempty" json:"inspectCommand,omitempty"`
	RenewCommand        string         `yaml:"renewCommand,omitempty" json:"renewCommand,omitempty"`
	RestartCommand      string         `yaml:"restartCommand,omitempty" json:"restartCommand,omitempty"`
}

type KubernetesClusterSpec added in v1.0.9

type KubernetesClusterSpec struct {
	Transport         string               `yaml:"transport,omitempty" json:"transport,omitempty"`
	Target            string               `yaml:"target,omitempty" json:"target,omitempty"`
	TargetEnv         string               `yaml:"targetEnv,omitempty" json:"targetEnv,omitempty"`
	Timeout           *time.Duration       `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	Kubeconfig        string               `yaml:"kubeconfig,omitempty" json:"kubeconfig,omitempty"`
	KubeconfigEnv     string               `yaml:"kubeconfigEnv,omitempty" json:"kubeconfigEnv,omitempty"`
	Context           string               `yaml:"context,omitempty" json:"context,omitempty"`
	MinReadyNodes     int                  `yaml:"minReadyNodes,omitempty" json:"minReadyNodes,omitempty"`
	Namespaces        []string             `yaml:"namespaces,omitempty" json:"namespaces,omitempty"`
	StableIterations  int                  `yaml:"stableIterations,omitempty" json:"stableIterations,omitempty"`
	StableInterval    *time.Duration       `yaml:"stableInterval,omitempty" json:"stableInterval,omitempty"`
	ConfigCommand     string               `yaml:"configCommand,omitempty" json:"configCommand,omitempty"`
	APICommand        string               `yaml:"apiCommand,omitempty" json:"apiCommand,omitempty"`
	NodesCommand      string               `yaml:"nodesCommand,omitempty" json:"nodesCommand,omitempty"`
	NamespacesCommand string               `yaml:"namespacesCommand,omitempty" json:"namespacesCommand,omitempty"`
	PodsCommand       string               `yaml:"podsCommand,omitempty" json:"podsCommand,omitempty"`
	AppProbes         []KubernetesAppProbe `yaml:"appProbes,omitempty" json:"appProbes,omitempty"`
}

type KubernetesLifecyclePolicyOverrideScopeSpec added in v1.0.9

type KubernetesLifecyclePolicyOverrideScopeSpec struct {
	NodeID          string   `yaml:"nodeId,omitempty" json:"nodeId,omitempty"`
	RunID           string   `yaml:"runId,omitempty" json:"runId,omitempty"`
	IntentDigest    string   `yaml:"intentDigest,omitempty" json:"intentDigest,omitempty"`
	TargetIDs       []string `yaml:"targetIds,omitempty" json:"targetIds,omitempty"`
	TargetSetDigest string   `yaml:"targetSetDigest,omitempty" json:"targetSetDigest,omitempty"`
}

type KubernetesLifecyclePolicyOverrideSpec added in v1.0.9

type KubernetesLifecyclePolicyOverrideSpec struct {
	Reason    string                                     `yaml:"reason,omitempty" json:"reason,omitempty"`
	Ticket    string                                     `yaml:"ticket,omitempty" json:"ticket,omitempty"`
	ChangeID  string                                     `yaml:"changeId,omitempty" json:"changeId,omitempty"`
	Approver  string                                     `yaml:"approver,omitempty" json:"approver,omitempty"`
	ExpiresAt string                                     `yaml:"expiresAt,omitempty" json:"expiresAt,omitempty"`
	Scope     KubernetesLifecyclePolicyOverrideScopeSpec `yaml:"scope,omitempty" json:"scope,omitempty"`
}

type KubernetesLifecyclePolicySpec added in v1.0.9

type KubernetesLifecyclePolicySpec struct {
	MaxUnavailable           int                                   `yaml:"maxUnavailable,omitempty" json:"maxUnavailable,omitempty"`
	RequireFreshInspect      bool                                  `yaml:"requireFreshInspect,omitempty" json:"requireFreshInspect,omitempty"`
	MaxInspectAge            *time.Duration                        `yaml:"maxInspectAge,omitempty" json:"maxInspectAge,omitempty"`
	RequireHealthyInspect    bool                                  `yaml:"requireHealthyInspect,omitempty" json:"requireHealthyInspect,omitempty"`
	RequireSupportedProvider bool                                  `yaml:"requireSupportedProvider,omitempty" json:"requireSupportedProvider,omitempty"`
	MaintenanceWindow        KubernetesMaintenanceWindowSpec       `yaml:"maintenanceWindow,omitempty" json:"maintenanceWindow,omitempty"`
	AppProbes                []KubernetesAppProbe                  `yaml:"appProbes,omitempty" json:"appProbes,omitempty"`
	Override                 KubernetesLifecyclePolicyOverrideSpec `yaml:"override,omitempty" json:"override,omitempty"`
}

type KubernetesMaintenanceWindowSpec added in v1.0.9

type KubernetesMaintenanceWindowSpec struct {
	Start    string   `yaml:"start,omitempty" json:"start,omitempty"`
	End      string   `yaml:"end,omitempty" json:"end,omitempty"`
	TimeZone string   `yaml:"timeZone,omitempty" json:"timeZone,omitempty"`
	Days     []string `yaml:"days,omitempty" json:"days,omitempty"`
}

type KubernetesSpec added in v1.0.9

type KubernetesSpec struct {
	Provider     string                `yaml:"provider,omitempty" json:"provider,omitempty"`
	Certificates KubernetesCertSpec    `yaml:"certificates,omitempty" json:"certificates,omitempty"`
	Cluster      KubernetesClusterSpec `yaml:"cluster,omitempty" json:"cluster,omitempty"`
}

type LoadSealedPlanOptions

type LoadSealedPlanOptions struct {
	// StateStoreRoot is written into Plan.StackRoot so the run uses the current stack root
	// for state storage, even when inputs are loaded from a sealed artifact.
	StateStoreRoot string

	// Exactly one of SealedDir or BundlePath must be set.
	SealedDir    string
	BundlePath   string
	VerifyBundle bool

	RequireSigned bool
	TrustedPubKey []byte
}

type LoadedRun

type LoadedRun struct {
	RootDir     string
	RunID       string
	Plan        *Plan
	StatusByID  map[string]string
	AttemptByID map[string]int
}

func LoadRun

func LoadRun(root string, runID string) (*LoadedRun, error)

type NodeDiffSummary

type NodeDiffSummary struct {
	Add     int            `json:"add"`
	Change  int            `json:"change"`
	Replace int            `json:"replace"`
	Destroy int            `json:"destroy"`
	Risky   map[string]int `json:"risky,omitempty"`
	Error   string         `json:"error,omitempty"`
}

type NodeExecutor

type NodeExecutor interface {
	RunNode(ctx context.Context, node *runNode, command string) error
}

type NodeMetaFields

type NodeMetaFields struct {
	Cluster          string
	Namespace        string
	Name             string
	ExecutionGroup   int
	ParallelismGroup string
	PrimaryKind      string
	Critical         bool
}

func (NodeMetaFields) Map

func (f NodeMetaFields) Map() map[string]any

type NodeSpec added in v1.0.9

type NodeSpec = ReleaseSpec

NodeSpec is the generic stack node config shape. ReleaseSpec remains as the backward-compatible Helm-oriented alias accepted under `releases:`.

type NodeStepCheckpoint

type NodeStepCheckpoint struct {
	Step          string
	Attempt       int
	StartedAtNS   int64
	CompletedAtNS int64
	Status        string
	Message       string
	ErrorClass    string
	ErrorMessage  string
	ErrorDigest   string
	CursorJSON    string
}

type PhaseFields

type PhaseFields struct {
	Phase   string
	Status  string
	Message string
}

func (PhaseFields) Map

func (f PhaseFields) Map() map[string]any

type Plan

type Plan struct {
	StackRoot string                        `json:"stackRoot"`
	StackName string                        `json:"stackName"`
	Profile   string                        `json:"profile"`
	Nodes     []*ResolvedRelease            `json:"nodes"`
	Order     []string                      `json:"order,omitempty"`
	Runner    RunnerResolved                `json:"runner,omitempty"`
	Hooks     StackHooksConfig              `json:"hooks,omitempty"`
	ByID      map[string]*ResolvedRelease   `json:"-"`
	ByCluster map[string][]*ResolvedRelease `json:"-"`
}

func Compile

func Compile(u *Universe, opts CompileOptions) (*Plan, error)

func FilterByClusters

func FilterByClusters(p *Plan, clusters []string) *Plan

func FilterByNodeStatus

func FilterByNodeStatus(p *Plan, statusByID map[string]string, wantStatuses []string) *Plan

func LoadSealedPlan

func LoadSealedPlan(ctx context.Context, opts LoadSealedPlanOptions) (*Plan, func(), error)

LoadSealedPlan loads a run plan (plan.json + inputs.tar.gz) either from a directory produced by `torque stack seal` or from a portable .tgz bundle.

The returned cleanup must be called to remove any temporary extraction directories.

func PlanFromRunPlan

func PlanFromRunPlan(rp *RunPlan) (*Plan, error)

func Select

func Select(u *Universe, p *Plan, clusters []string, sel Selector) (*Plan, error)

type ReleaseDefaults

type ReleaseDefaults struct {
	Cluster    ClusterTarget     `yaml:"cluster,omitempty" json:"cluster,omitempty"`
	Namespace  string            `yaml:"namespace,omitempty" json:"namespace,omitempty"`
	Values     []string          `yaml:"values,omitempty" json:"values,omitempty"`
	Set        map[string]string `yaml:"set,omitempty" json:"set,omitempty"`
	Apply      ApplyOptions      `yaml:"apply,omitempty" json:"apply,omitempty"`
	Delete     DeleteOptions     `yaml:"delete,omitempty" json:"delete,omitempty"`
	Verify     VerifyOptions     `yaml:"verify,omitempty" json:"verify,omitempty"`
	Tags       []string          `yaml:"tags,omitempty" json:"tags,omitempty"`
	Extra      map[string]any    `yaml:",inline" json:"-"`
	RawIgnored map[string]any    `yaml:"-" json:"-"`
}

type ReleaseFile

type ReleaseFile struct {
	APIVersionKind `yaml:",inline" json:",inline"`

	NodeKind     string            `yaml:"nodeKind,omitempty" json:"nodeKind,omitempty"`
	Name         string            `yaml:"name,omitempty" json:"name,omitempty"`
	Chart        string            `yaml:"chart,omitempty" json:"chart,omitempty"`
	ChartVersion string            `yaml:"chartVersion,omitempty" json:"chartVersion,omitempty"`
	Wave         int               `yaml:"wave,omitempty" json:"wave,omitempty"`
	Critical     bool              `yaml:"critical,omitempty" json:"critical,omitempty"`
	Parallelism  string            `yaml:"parallelismGroup,omitempty" json:"parallelismGroup,omitempty"`
	Cluster      ClusterTarget     `yaml:"cluster,omitempty" json:"cluster,omitempty"`
	Namespace    string            `yaml:"namespace,omitempty" json:"namespace,omitempty"`
	Values       []string          `yaml:"values,omitempty" json:"values,omitempty"`
	Set          map[string]string `yaml:"set,omitempty" json:"set,omitempty"`
	Tags         []string          `yaml:"tags,omitempty" json:"tags,omitempty"`
	Needs        []string          `yaml:"needs,omitempty" json:"needs,omitempty"`
	Apply        ApplyOptions      `yaml:"apply,omitempty" json:"apply,omitempty"`
	Delete       DeleteOptions     `yaml:"delete,omitempty" json:"delete,omitempty"`
	Hooks        StackHooksConfig  `yaml:"hooks,omitempty" json:"hooks,omitempty"`
	Action       ActionSpec        `yaml:"action,omitempty" json:"action,omitempty"`
	Database     DatabaseSpec      `yaml:"database,omitempty" json:"database,omitempty"`
	Kubernetes   KubernetesSpec    `yaml:"kubernetes,omitempty" json:"kubernetes,omitempty"`
}

type ReleaseSpec

type ReleaseSpec struct {
	Kind         string            `yaml:"kind,omitempty" json:"kind,omitempty"`
	Name         string            `yaml:"name,omitempty" json:"name,omitempty"`
	Chart        string            `yaml:"chart,omitempty" json:"chart,omitempty"`
	ChartVersion string            `yaml:"chartVersion,omitempty" json:"chartVersion,omitempty"`
	Wave         int               `yaml:"wave,omitempty" json:"wave,omitempty"`
	Critical     bool              `yaml:"critical,omitempty" json:"critical,omitempty"`
	Parallelism  string            `yaml:"parallelismGroup,omitempty" json:"parallelismGroup,omitempty"`
	Cluster      ClusterTarget     `yaml:"cluster,omitempty" json:"cluster,omitempty"`
	Namespace    string            `yaml:"namespace,omitempty" json:"namespace,omitempty"`
	Values       []string          `yaml:"values,omitempty" json:"values,omitempty"`
	Set          map[string]string `yaml:"set,omitempty" json:"set,omitempty"`
	Tags         []string          `yaml:"tags,omitempty" json:"tags,omitempty"`
	Needs        []string          `yaml:"needs,omitempty" json:"needs,omitempty"`
	Apply        ApplyOptions      `yaml:"apply,omitempty" json:"apply,omitempty"`
	Delete       DeleteOptions     `yaml:"delete,omitempty" json:"delete,omitempty"`
	Verify       VerifyOptions     `yaml:"verify,omitempty" json:"verify,omitempty"`
	Hooks        StackHooksConfig  `yaml:"hooks,omitempty" json:"hooks,omitempty"`
	Action       ActionSpec        `yaml:"action,omitempty" json:"action,omitempty"`
	Database     DatabaseSpec      `yaml:"database,omitempty" json:"database,omitempty"`
	Host         HostCommandSpec   `yaml:"host,omitempty" json:"host,omitempty"`
	Kubernetes   KubernetesSpec    `yaml:"kubernetes,omitempty" json:"kubernetes,omitempty"`
	Input        map[string]any    `yaml:"input,omitempty" json:"input,omitempty"`
}

type ResolvedRelease

type ResolvedRelease struct {
	ID        string        `json:"id"`
	Kind      string        `json:"kind,omitempty"`
	Name      string        `json:"name"`
	Dir       string        `json:"dir"`
	Cluster   ClusterTarget `json:"cluster"`
	Namespace string        `json:"namespace"`

	Chart        string            `json:"chart"`
	ChartVersion string            `json:"chartVersion,omitempty"`
	Wave         int               `json:"wave,omitempty"`
	Critical     bool              `json:"critical,omitempty"`
	Parallelism  string            `json:"parallelismGroup,omitempty"`
	Values       []string          `json:"values"`
	Set          map[string]string `json:"set"`

	Tags  []string `json:"tags"`
	Needs []string `json:"needs"`

	Apply  ApplyOptions  `json:"apply"`
	Delete DeleteOptions `json:"delete"`
	Verify VerifyOptions `json:"verify,omitempty"`

	Hooks      StackHooksConfig `json:"hooks,omitempty"`
	Action     ActionSpec       `json:"action,omitempty"`
	Database   DatabaseSpec     `json:"database,omitempty"`
	Host       HostCommandSpec  `json:"host,omitempty"`
	Kubernetes KubernetesSpec   `json:"kubernetes,omitempty"`

	SelectedBy []string `json:"selectedBy,omitempty"`

	InferredNeeds       []InferredNeed `json:"inferredNeeds,omitempty"`
	InferredRole        string         `json:"inferredRole,omitempty"`
	InferredPrimaryKind string         `json:"inferredPrimaryKind,omitempty"`

	EffectiveInputHash string          `json:"effectiveInputHash,omitempty"`
	EffectiveInput     *EffectiveInput `json:"effectiveInput,omitempty"`
	ExecutionGroup     int             `json:"executionGroup,omitempty"`
}

type RetryScheduledFields

type RetryScheduledFields struct {
	Backoff string
}

func (RetryScheduledFields) Map

func (f RetryScheduledFields) Map() map[string]any

type RunArtifact added in v1.0.9

type RunArtifact struct {
	RunID       string `json:"runId"`
	NodeID      string `json:"nodeId,omitempty"`
	Name        string `json:"name"`
	ContentType string `json:"contentType,omitempty"`
	SHA256      string `json:"sha256,omitempty"`
	SizeBytes   int    `json:"sizeBytes,omitempty"`
	CreatedAt   string `json:"createdAt,omitempty"`
	Body        string `json:"body,omitempty"`
}

type RunAudit

type RunAudit struct {
	APIVersion    string `json:"apiVersion"`
	RunID         string `json:"runId"`
	Status        string `json:"status"`
	CreatedAt     string `json:"createdAt"`
	UpdatedAt     string `json:"updatedAt"`
	CompletedAt   string `json:"completedAt,omitempty"`
	CreatedBy     string `json:"createdBy,omitempty"`
	Host          string `json:"host,omitempty"`
	PID           int    `json:"pid,omitempty"`
	CIRunURL      string `json:"ciRunUrl,omitempty"`
	GitAuthor     string `json:"gitAuthor,omitempty"`
	Kubeconfig    string `json:"kubeconfig,omitempty"`
	KubeContext   string `json:"kubeContext,omitempty"`
	StatePath     string `json:"statePath,omitempty"`
	FollowCommand string `json:"followCommand,omitempty"`
	RunDigest     string `json:"runDigest,omitempty"`

	Integrity       RunIntegrity     `json:"integrity"`
	Summary         *RunSummary      `json:"summary,omitempty"`
	FailureClusters []FailureCluster `json:"failureClusters,omitempty"`
	Artifacts       []RunArtifact    `json:"artifacts,omitempty"`

	Plan   *RunPlan   `json:"plan,omitempty"`
	Events []RunEvent `json:"events,omitempty"`
}

func GetRunAudit

func GetRunAudit(ctx context.Context, opts RunAuditOptions) (*RunAudit, error)

type RunAuditOptions

type RunAuditOptions struct {
	RootDir          string
	RunID            string
	Verify           bool
	EventsLimit      int
	IncludePlan      bool
	IncludeEvents    bool
	IncludeArtifacts bool
}

type RunBundleManifest

type RunBundleManifest struct {
	APIVersion  string `json:"apiVersion"`
	Kind        string `json:"kind"`
	CreatedAt   string `json:"createdAt"`
	RunID       string `json:"runId"`
	RunDigest   string `json:"runDigest,omitempty"`
	StateSHA256 string `json:"stateSha256"`
}

type RunConsole

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

RunConsole renders stack run events into a single in-place updating TTY view. It is event-driven: callers should feed RunEvent values via ObserveRunEvent.

func NewRunConsole

func NewRunConsole(out io.Writer, plan *Plan, command string, opts RunConsoleOptions) *RunConsole

func (*RunConsole) Done

func (c *RunConsole) Done()

func (*RunConsole) ObserveRunEvent

func (c *RunConsole) ObserveRunEvent(ev RunEvent)

func (*RunConsole) SnapshotLines

func (c *RunConsole) SnapshotLines() []string

SnapshotLines returns the current console surface as plain lines (no cursor movement). It is intended for tests and debugging.

type RunConsoleOptions

type RunConsoleOptions struct {
	Enabled bool
	Verbose bool
	Width   int

	// ShowNoisyPhases forces the Phase column to include phases that are normally
	// suppressed in non-verbose mode (e.g. pre-apply/post-apply).
	ShowNoisyPhases bool

	// NodeFilter controls which nodes are shown in the node table.
	// Supported values: all|running|failed.
	NodeFilter string

	// ShowHooks renders a recent-hook activity panel below the node table.
	ShowHooks bool

	// HookTail caps stored hook events in the HOOKS panel (0 uses a default).
	HookTail int

	// ShowDetails renders an expanded per-node details panel (hooks + helm tail).
	ShowDetails bool

	// DetailsTail caps lines shown per node in the details panel (0 uses a default).
	DetailsTail int

	// Now returns the current time for elapsed calculations. Defaults to time.Now.
	Now func() time.Time

	// Color toggles ANSI styling for the TTY surface.
	Color bool

	// ShowHelmLogs renders HELM_LOG events under each node.
	ShowHelmLogs bool

	// CaptureHelmLogs stores HELM_LOG events for failure hints and the details
	// panel even when ShowHelmLogs is false.
	CaptureHelmLogs bool

	// HelmLogsMode controls which nodes are included in the HELM LOGS section.
	// Supported values: off|on|all. "on" shows only non-succeeded nodes.
	HelmLogsMode string

	// HelmLogTail caps stored log lines per node (0 uses a default).
	HelmLogTail int
}

type RunError

type RunError struct {
	Class   string `json:"class,omitempty"`
	Message string `json:"message,omitempty"`
	Digest  string `json:"digest,omitempty"`
}

type RunEvent

type RunEvent struct {
	Seq     int64          `json:"seq,omitempty"`
	TS      string         `json:"ts"`
	RunID   string         `json:"runId"`
	NodeID  string         `json:"nodeId,omitempty"`
	Type    string         `json:"type"`
	Attempt int            `json:"attempt"`
	Message string         `json:"message,omitempty"`
	Fields  map[string]any `json:"fields,omitempty"`
	Error   *RunError      `json:"error,omitempty"`

	PrevDigest string `json:"prevDigest,omitempty"`
	Digest     string `json:"digest,omitempty"`
	CRC32      string `json:"crc32,omitempty"`
}

type RunEventObserver

type RunEventObserver interface {
	ObserveRunEvent(RunEvent)
}

type RunEventObserverFunc

type RunEventObserverFunc func(RunEvent)

func (RunEventObserverFunc) ObserveRunEvent

func (f RunEventObserverFunc) ObserveRunEvent(ev RunEvent)

type RunEventType

type RunEventType string

RunEventType enumerates structured stack run events.

These values are persisted in the sqlite state store and are consumed by `torque stack status --follow` and the stack run renderers.

const (
	RunStarted     RunEventType = "RUN_STARTED"
	RunCompleted   RunEventType = "RUN_COMPLETED"
	RunConcurrency RunEventType = "RUN_CONCURRENCY"
	RunFinalizing  RunEventType = "RUN_FINALIZING"
	RunFinalized   RunEventType = "RUN_FINALIZED"

	NodeMeta RunEventType = "NODE_META"

	NodeQueued    RunEventType = "NODE_QUEUED"
	NodeRunning   RunEventType = "NODE_RUNNING"
	NodeSucceeded RunEventType = "NODE_SUCCEEDED"
	NodeFailed    RunEventType = "NODE_FAILED"
	NodeBlocked   RunEventType = "NODE_BLOCKED"

	PhaseStarted   RunEventType = "PHASE_STARTED"
	PhaseCompleted RunEventType = "PHASE_COMPLETED"

	HookStarted   RunEventType = "HOOK_STARTED"
	HookSucceeded RunEventType = "HOOK_SUCCEEDED"
	HookFailed    RunEventType = "HOOK_FAILED"
	HookSkipped   RunEventType = "HOOK_SKIPPED"

	StackHooksStarted   RunEventType = "STACK_HOOKS_STARTED"
	StackHooksCompleted RunEventType = "STACK_HOOKS_COMPLETED"

	BudgetWait     RunEventType = "BUDGET_WAIT"
	RetryScheduled RunEventType = "RETRY_SCHEDULED"

	// NodeLog is an ephemeral, non-durable event used for verbose rendering.
	// It is not expected to be stored in sqlite.
	NodeLog RunEventType = "NODE_LOG"

	// HelmLog is an optional, durable log stream captured from Helm operations.
	// It is intended to be stored in sqlite when enabled by the caller.
	HelmLog RunEventType = "HELM_LOG"
)

type RunIndexEntry

type RunIndexEntry struct {
	RunID      string    `json:"runId"`
	RunRoot    string    `json:"runRoot"`
	StackName  string    `json:"stackName,omitempty"`
	Profile    string    `json:"profile,omitempty"`
	Status     string    `json:"status,omitempty"`
	StartedAt  string    `json:"startedAt,omitempty"`
	UpdatedAt  string    `json:"updatedAt,omitempty"`
	Totals     RunTotals `json:"totals,omitempty"`
	HasSummary bool      `json:"hasSummary"`
}

RunIndexEntry is a compact summary of a run, used by `torque stack runs`.

func ListRuns

func ListRuns(root string, limit int) ([]RunIndexEntry, error)

ListRuns lists recent runs. It prefers the sqlite state store when present, and requires it (legacy on-disk runs have been removed).

type RunIntegrity

type RunIntegrity struct {
	EventsOK         bool   `json:"eventsOk"`
	EventsError      string `json:"eventsError,omitempty"`
	LastEventDigest  string `json:"lastEventDigest,omitempty"`
	StoredLastDigest string `json:"storedLastDigest,omitempty"`

	RunDigestOK       bool   `json:"runDigestOk"`
	RunDigestExpected string `json:"runDigestExpected,omitempty"`
	RunDigestStored   string `json:"runDigestStored,omitempty"`
	RunDigestError    string `json:"runDigestError,omitempty"`
}

type RunNodeSummary

type RunNodeSummary struct {
	Status  string `json:"status"`
	Attempt int    `json:"attempt,omitempty"`
	Error   string `json:"error,omitempty"`
}

type RunOptions

type RunOptions struct {
	Command        string
	Plan           *Plan
	Concurrency    int
	FailFast       bool
	AutoApprove    bool
	DryRun         bool
	Diff           bool
	CacheApply     bool
	PolicyOverride bool
	Executor       NodeExecutor
	Secrets        *deploy.SecretOptions

	HelmLogs bool

	KubeQPS   float32
	KubeBurst int

	MaxConcurrencyPerNamespace int
	MaxConcurrencyByKind       map[string]int
	ParallelismGroupLimit      int
	Adaptive                   *AdaptiveConcurrencyOptions

	ResumeStatusByID  map[string]string
	ResumeFromRunID   string
	ResumeAttemptByID map[string]int
	ResumeStepsByID   map[string]map[int]map[string]NodeStepCheckpoint

	ProgressiveConcurrency bool
	Lock                   bool
	LockOwner              string
	LockTTL                time.Duration
	TakeoverLock           bool

	Kubeconfig      *string
	KubeContext     *string
	LogLevel        *string
	RemoteAgentAddr *string

	RunID string

	Selector        RunSelector
	FailMode        string
	MaxAttempts     int
	InitialAttempts map[string]int

	EventObservers []RunEventObserver
}

type RunPlan

type RunPlan struct {
	APIVersion  string             `json:"apiVersion"`
	RunID       string             `json:"runId"`
	PlanHash    string             `json:"planHash,omitempty"`
	StackRoot   string             `json:"stackRoot"`
	StackName   string             `json:"stackName"`
	Command     string             `json:"command"`
	Profile     string             `json:"profile"`
	Concurrency int                `json:"concurrency"`
	FailMode    string             `json:"failMode"`
	Selector    RunSelector        `json:"selector,omitempty"`
	Nodes       []*ResolvedRelease `json:"nodes"`
	Runner      RunnerResolved     `json:"runner,omitempty"`

	StackGitCommit string `json:"stackGitCommit,omitempty"`
	StackGitDirty  bool   `json:"stackGitDirty,omitempty"`

	TorqueVersion   string `json:"torqueVersion,omitempty"`
	TorqueGitCommit string `json:"torqueGitCommit,omitempty"`
}

type RunSelector

type RunSelector struct {
	Clusters             []string `json:"clusters,omitempty"`
	Tags                 []string `json:"tags,omitempty"`
	FromPaths            []string `json:"fromPaths,omitempty"`
	Releases             []string `json:"releases,omitempty"`
	GitRange             string   `json:"gitRange,omitempty"`
	GitIncludeDeps       bool     `json:"gitIncludeDeps,omitempty"`
	GitIncludeDependents bool     `json:"gitIncludeDependents,omitempty"`
	IncludeDeps          bool     `json:"includeDeps,omitempty"`
	IncludeDependents    bool     `json:"includeDependents,omitempty"`
	AllowMissingDeps     bool     `json:"allowMissingDeps,omitempty"`
}

type RunSummary

type RunSummary struct {
	APIVersion string                    `json:"apiVersion"`
	RunID      string                    `json:"runId"`
	Status     string                    `json:"status"`
	StartedAt  string                    `json:"startedAt"`
	UpdatedAt  string                    `json:"updatedAt"`
	Totals     RunTotals                 `json:"totals"`
	Nodes      map[string]RunNodeSummary `json:"nodes"`
	Order      []string                  `json:"order,omitempty"`
}

type RunTotals

type RunTotals struct {
	Planned   int `json:"planned"`
	Succeeded int `json:"succeeded"`
	Failed    int `json:"failed"`
	Blocked   int `json:"blocked"`
	Running   int `json:"running"`
}

type RunnerAdaptive

type RunnerAdaptive struct {
	Mode               string   `yaml:"mode,omitempty" json:"mode,omitempty"`
	Min                *int     `yaml:"min,omitempty" json:"min,omitempty"`
	Window             *int     `yaml:"window,omitempty" json:"window,omitempty"`
	RampAfterSuccesses *int     `yaml:"rampAfterSuccesses,omitempty" json:"rampAfterSuccesses,omitempty"`
	RampMaxFailureRate *float64 `yaml:"rampMaxFailureRate,omitempty" json:"rampMaxFailureRate,omitempty"`
	CooldownSevere     *int     `yaml:"cooldownSevere,omitempty" json:"cooldownSevere,omitempty"`
}

type RunnerAdaptiveResolved

type RunnerAdaptiveResolved struct {
	Mode               string  `json:"mode,omitempty"`
	Min                int     `json:"min,omitempty"`
	Window             int     `json:"window,omitempty"`
	RampAfterSuccesses int     `json:"rampAfterSuccesses,omitempty"`
	RampMaxFailureRate float64 `json:"rampMaxFailureRate,omitempty"`
	CooldownSevere     int     `json:"cooldownSevere,omitempty"`
}

type RunnerConfig

type RunnerConfig struct {
	Concurrency            *int           `yaml:"concurrency,omitempty" json:"concurrency,omitempty"`
	ProgressiveConcurrency *bool          `yaml:"progressiveConcurrency,omitempty" json:"progressiveConcurrency,omitempty"`
	KubeQPS                *float32       `yaml:"kubeQPS,omitempty" json:"kubeQPS,omitempty"`
	KubeBurst              *int           `yaml:"kubeBurst,omitempty" json:"kubeBurst,omitempty"`
	Limits                 RunnerLimits   `yaml:"limits,omitempty" json:"limits,omitempty"`
	Adaptive               RunnerAdaptive `yaml:"adaptive,omitempty" json:"adaptive,omitempty"`
	Extra                  map[string]any `yaml:",inline" json:"-"`
	RawIgnored             map[string]any `yaml:"-" json:"-"`
}

type RunnerLimits

type RunnerLimits struct {
	MaxParallelPerNamespace *int           `yaml:"maxParallelPerNamespace,omitempty" json:"maxParallelPerNamespace,omitempty"`
	MaxParallelKind         map[string]int `yaml:"maxParallelKind,omitempty" json:"maxParallelKind,omitempty"`
	ParallelismGroupLimit   *int           `yaml:"parallelismGroupLimit,omitempty" json:"parallelismGroupLimit,omitempty"`
}

type RunnerLimitsResolved

type RunnerLimitsResolved struct {
	MaxParallelPerNamespace int            `json:"maxParallelPerNamespace,omitempty"`
	MaxParallelKind         map[string]int `json:"maxParallelKind,omitempty"`
	ParallelismGroupLimit   int            `json:"parallelismGroupLimit,omitempty"`
}

type RunnerResolved

type RunnerResolved struct {
	Concurrency            int                    `json:"concurrency"`
	ProgressiveConcurrency bool                   `json:"progressiveConcurrency"`
	KubeQPS                float32                `json:"kubeQPS,omitempty"`
	KubeBurst              int                    `json:"kubeBurst,omitempty"`
	Limits                 RunnerLimitsResolved   `json:"limits,omitempty"`
	Adaptive               RunnerAdaptiveResolved `json:"adaptive,omitempty"`
}

func ResolveRunnerConfig

func ResolveRunnerConfig(u *Universe, profile string) (RunnerResolved, error)

type ScriptHookConfig

type ScriptHookConfig struct {
	Command []string          `yaml:"command,omitempty" json:"command,omitempty"`
	Env     map[string]string `yaml:"env,omitempty" json:"env,omitempty"`
	WorkDir string            `yaml:"workDir,omitempty" json:"workDir,omitempty"`
}

type SealedPlanError

type SealedPlanError struct {
	Kind   SealedPlanErrorKind
	NodeID string
	Want   string
	Got    string
}

func (*SealedPlanError) Error

func (e *SealedPlanError) Error() string

type SealedPlanErrorKind

type SealedPlanErrorKind string
const (
	SealedPlanErrAttestationPlanHashMismatch SealedPlanErrorKind = "attestation_plan_hash_mismatch"
	SealedPlanErrBundleDigestMismatch        SealedPlanErrorKind = "bundle_digest_mismatch"
	SealedPlanErrPlanHashMismatch            SealedPlanErrorKind = "plan_hash_mismatch"
	SealedPlanErrBundlePlanHashMismatch      SealedPlanErrorKind = "bundle_plan_hash_mismatch"
	SealedPlanErrInputHashMismatch           SealedPlanErrorKind = "input_hash_mismatch"
)

type SelectResult

type SelectResult struct {
	Plan     *Plan
	Selected []*ResolvedRelease
}

type Selector

type Selector struct {
	Tags      []string
	FromPaths []string
	Releases  []string
	GitRange  string

	GitIncludeDeps       bool
	GitIncludeDependents bool

	IncludeDeps       bool
	IncludeDependents bool

	// AllowMissingDeps relaxes validation and treats missing needs as "skipped":
	// the selected plan is pruned so nodes only depend on other selected nodes.
	AllowMissingDeps bool
}

type StackApplyCLIConfig

type StackApplyCLIConfig struct {
	DryRun *bool `yaml:"dryRun,omitempty" json:"dryRun,omitempty"`
	Diff   *bool `yaml:"diff,omitempty" json:"diff,omitempty"`

	FailFast *bool              `yaml:"failFast,omitempty" json:"failFast,omitempty"`
	Retry    *int               `yaml:"retry,omitempty" json:"retry,omitempty"`
	Lock     StackLockCLIConfig `yaml:"lock,omitempty" json:"lock,omitempty"`
}

type StackCLIConfig

type StackCLIConfig struct {
	// Selector sets default release selection constraints.
	Selector StackSelectorConfig `yaml:"selector,omitempty" json:"selector,omitempty"`

	// InferDeps controls whether selection includes inferred edges via manifest rendering.
	InferDeps       *bool `yaml:"inferDeps,omitempty" json:"inferDeps,omitempty"`
	InferConfigRefs *bool `yaml:"inferConfigRefs,omitempty" json:"inferConfigRefs,omitempty"`

	// Output sets default output format for commands that support it (e.g. plan/runs).
	Output string `yaml:"output,omitempty" json:"output,omitempty"`

	// Apply/Delete are CLI defaults specific to the run commands.
	Apply  StackApplyCLIConfig  `yaml:"apply,omitempty" json:"apply,omitempty"`
	Delete StackDeleteCLIConfig `yaml:"delete,omitempty" json:"delete,omitempty"`
	Resume StackResumeCLIConfig `yaml:"resume,omitempty" json:"resume,omitempty"`
}

StackCLIConfig controls default CLI behavior for `torque stack ...` subcommands. Flags and environment variables can override these settings.

type StackCLIResolved

type StackCLIResolved struct {
	Clusters []string
	Selector Selector

	InferDeps       bool
	InferConfigRefs bool
	Output          string

	ApplyDryRun    *bool
	ApplyDiff      *bool
	ApplyFailFast  *bool
	ApplyRetry     *int
	ApplyLock      *bool
	ApplyTakeover  *bool
	ApplyLockTTL   *time.Duration
	ApplyLockOwner *string

	DeleteConfirmThreshold *int
	DeleteFailFast         *bool
	DeleteRetry            *int
	DeleteLock             *bool
	DeleteTakeover         *bool
	DeleteLockTTL          *time.Duration
	DeleteLockOwner        *string

	ResumeAllowDrift  *bool
	ResumeRerunFailed *bool
}

func ResolveStackCLIConfig

func ResolveStackCLIConfig(u *Universe, profile string) (StackCLIResolved, error)

type StackDeleteCLIConfig

type StackDeleteCLIConfig struct {
	ConfirmThreshold *int `yaml:"confirmThreshold,omitempty" json:"confirmThreshold,omitempty"`

	FailFast *bool              `yaml:"failFast,omitempty" json:"failFast,omitempty"`
	Retry    *int               `yaml:"retry,omitempty" json:"retry,omitempty"`
	Lock     StackLockCLIConfig `yaml:"lock,omitempty" json:"lock,omitempty"`
}

type StackDiffSummary

type StackDiffSummary struct {
	APIVersion string                     `json:"apiVersion"`
	CreatedAt  string                     `json:"createdAt,omitempty"`
	PlanHash   string                     `json:"planHash"`
	Nodes      map[string]NodeDiffSummary `json:"nodes"`
}

func BuildStackDiffSummary

func BuildStackDiffSummary(ctx context.Context, p *Plan, defaultKubeconfig string, defaultKubeContext string, planHash string, secrets *deploy.SecretOptions) (*StackDiffSummary, error)

type StackFile

type StackFile struct {
	APIVersionKind `yaml:",inline" json:",inline"`

	Name           string                  `yaml:"name,omitempty" json:"name,omitempty"`
	DefaultProfile string                  `yaml:"defaultProfile,omitempty" json:"defaultProfile,omitempty"`
	Profiles       map[string]StackProfile `yaml:"profiles,omitempty" json:"profiles,omitempty"`

	Defaults ReleaseDefaults  `yaml:"defaults,omitempty" json:"defaults,omitempty"`
	Runner   RunnerConfig     `yaml:"runner,omitempty" json:"runner,omitempty"`
	CLI      StackCLIConfig   `yaml:"cli,omitempty" json:"cli,omitempty"`
	Hooks    StackHooksConfig `yaml:"hooks,omitempty" json:"hooks,omitempty"`
	Releases []ReleaseSpec    `yaml:"releases,omitempty" json:"releases,omitempty"`
	Nodes    []NodeSpec       `yaml:"nodes,omitempty" json:"nodes,omitempty"`
}

type StackHooksConfig

type StackHooksConfig struct {
	PreApply   []HookSpec `yaml:"preApply,omitempty" json:"preApply,omitempty"`
	PostApply  []HookSpec `yaml:"postApply,omitempty" json:"postApply,omitempty"`
	PreDelete  []HookSpec `yaml:"preDelete,omitempty" json:"preDelete,omitempty"`
	PostDelete []HookSpec `yaml:"postDelete,omitempty" json:"postDelete,omitempty"`
}

func ResolveStackHooksConfig

func ResolveStackHooksConfig(u *Universe, profile string) (StackHooksConfig, error)

type StackLock

type StackLock struct {
	Owner     string
	RunID     string
	CreatedAt time.Time
	TTL       time.Duration
}

type StackLockCLIConfig

type StackLockCLIConfig struct {
	Enabled  *bool          `yaml:"enabled,omitempty" json:"enabled,omitempty"`
	Takeover *bool          `yaml:"takeover,omitempty" json:"takeover,omitempty"`
	TTL      *time.Duration `yaml:"ttl,omitempty" json:"ttl,omitempty"`
	Owner    *string        `yaml:"owner,omitempty" json:"owner,omitempty"`
}

type StackPlanBundleManifest

type StackPlanBundleManifest struct {
	APIVersion         string `json:"apiVersion"`
	Kind               string `json:"kind"`
	CreatedAt          string `json:"createdAt,omitempty"`
	PlanHash           string `json:"planHash"`
	InputsBundleSha256 string `json:"inputsBundleSha256,omitempty"`
	StackName          string `json:"stackName,omitempty"`
	Profile            string `json:"profile,omitempty"`
}

type StackProfile

type StackProfile struct {
	Defaults ReleaseDefaults  `yaml:"defaults,omitempty" json:"defaults,omitempty"`
	Runner   RunnerConfig     `yaml:"runner,omitempty" json:"runner,omitempty"`
	CLI      StackCLIConfig   `yaml:"cli,omitempty" json:"cli,omitempty"`
	Hooks    StackHooksConfig `yaml:"hooks,omitempty" json:"hooks,omitempty"`
}

type StackResumeCLIConfig

type StackResumeCLIConfig struct {
	AllowDrift  *bool `yaml:"allowDrift,omitempty" json:"allowDrift,omitempty"`
	RerunFailed *bool `yaml:"rerunFailed,omitempty" json:"rerunFailed,omitempty"`
}

type StackSelectorConfig

type StackSelectorConfig struct {
	Clusters  []string `yaml:"clusters,omitempty" json:"clusters,omitempty"`
	Tags      []string `yaml:"tags,omitempty" json:"tags,omitempty"`
	FromPaths []string `yaml:"fromPaths,omitempty" json:"fromPaths,omitempty"`
	Releases  []string `yaml:"releases,omitempty" json:"releases,omitempty"`
	GitRange  string   `yaml:"gitRange,omitempty" json:"gitRange,omitempty"`

	GitIncludeDeps       *bool `yaml:"gitIncludeDeps,omitempty" json:"gitIncludeDeps,omitempty"`
	GitIncludeDependents *bool `yaml:"gitIncludeDependents,omitempty" json:"gitIncludeDependents,omitempty"`

	IncludeDeps       *bool `yaml:"includeDeps,omitempty" json:"includeDeps,omitempty"`
	IncludeDependents *bool `yaml:"includeDependents,omitempty" json:"includeDependents,omitempty"`

	AllowMissingDeps *bool `yaml:"allowMissingDeps,omitempty" json:"allowMissingDeps,omitempty"`
}

type StatusOptions

type StatusOptions struct {
	RootDir string
	RunID   string
	Follow  bool
	Limit   int
	Format  string // raw|table|json|tty

	HelmLogs string
}

type Universe

type Universe struct {
	RootDir        string
	StackName      string
	DefaultProfile string

	Stacks   map[string]StackFile
	Releases []discoveredRelease
}

func Discover

func Discover(root string) (*Universe, error)

type VerifyCacheEntry

type VerifyCacheEntry struct {
	LastOKAtNS       int64
	LastCheckedAtNS  int64
	LastResult       string
	LastMessage      string
	LastEventRVJSON  string
	LastEvidenceJSON string
	UpdatedAtNS      int64
}

type VerifyCacheKey

type VerifyCacheKey struct {
	ClusterKey  string
	Namespace   string
	ReleaseName string
}

type VerifyConditionRequirement

type VerifyConditionRequirement struct {
	Group         string `yaml:"group,omitempty" json:"group,omitempty"`   // e.g. example.com
	Kind          string `yaml:"kind,omitempty" json:"kind,omitempty"`     // e.g. Widget
	ConditionType string `yaml:"type,omitempty" json:"type,omitempty"`     // e.g. Ready
	RequireStatus string `yaml:"status,omitempty" json:"status,omitempty"` // True|False|Unknown
	AllowMissing  bool   `yaml:"allowMissing,omitempty" json:"allowMissing,omitempty"`
}

type VerifyOptions

type VerifyOptions struct {
	// Enabled toggles post-apply verification for this release.
	Enabled *bool `yaml:"enabled,omitempty" json:"enabled,omitempty"`
	// FailOnWarnings fails the release when matching Warning events are observed.
	FailOnWarnings *bool `yaml:"failOnWarnings,omitempty" json:"failOnWarnings,omitempty"`
	// WarnOnly records verify findings but never fails the release.
	WarnOnly *bool `yaml:"warnOnly,omitempty" json:"warnOnly,omitempty"`
	// EventsWindow limits how far back to consider Warning events (prevents old noisy events
	// from failing new runs). Defaults to 15m when enabled.
	EventsWindow *time.Duration `yaml:"eventsWindow,omitempty" json:"eventsWindow,omitempty"`
	// Timeout bounds how long verify may run for this release. Defaults to 2m when enabled.
	Timeout *time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`

	// DenyReasons fails when a Warning event reason matches any entry (case-insensitive).
	// When empty, all Warning reasons are considered.
	DenyReasons []string `yaml:"denyReasons,omitempty" json:"denyReasons,omitempty"`
	// AllowReasons allows only these Warning event reasons when non-empty (case-insensitive).
	AllowReasons []string `yaml:"allowReasons,omitempty" json:"allowReasons,omitempty"`

	// RequireConditions enforces status.conditions on matching custom resources (CRs).
	RequireConditions []VerifyConditionRequirement `yaml:"requireConditions,omitempty" json:"requireConditions,omitempty"`
}

Jump to

Keyboard shortcuts

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