Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRDConditionRule ¶
type CRDConditionRule struct {
Group string
Version string
Kind string
Condition string
Expected string
}
CRDConditionRule defines a readiness rule for a CRD based on status.conditions. Example: external-secrets.io/v1beta1,ExternalSecret -> Condition: Ready, Expected: True
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is the entry point for resource tracking. It is designed to be long-lived for a single tracking session. Create a new Runner for each invocation.
func NewRunner ¶
func NewRunner(factory *kube.Factory, opts RunnerOptions) *Runner
NewRunner constructs a new Runner. It does not start any background goroutines.
func (*Runner) Run ¶
func (r *Runner) Run(ctx context.Context, objects []*unstructured.Unstructured) error
Run starts tracking for the provided objects and blocks until completion, failure, or context timeout/cancelled.
type RunnerOptions ¶
type RunnerOptions struct {
// DefaultNamespace is used to fill in missing namespaces when the object is namespaced.
DefaultNamespace string
// ShowEvents controls whether to render K8s event tables per resource.
ShowEvents bool
// OnlyErrorLogs controls whether to suppress healthy pod logs and print logs only
// when pods fail to provision (CrashLoopBackOff, ImagePullBackOff, OOMKilled, etc.).
OnlyErrorLogs bool
// Verbose enables debug logs to stdout.
Verbose bool
// ProgressPrintInterval controls how often progress/events/log tables are re-rendered.
ProgressPrintInterval time.Duration
// Global timeout for tracking. If 0, no global deadline is enforced here
// (callers can pass a context with deadline).
Timeout time.Duration
// FailureGracePeriod defines how long to keep tracking after a builtin tracker reports a failure,
// allowing transient errors (e.g., ImagePullBackOff) to recover. A second attempt will be made
// within this period before marking the resource as failed.
FailureGracePeriod time.Duration
// ExitOnFirstFail makes the runner stop early as soon as a tracked resource fails.
ExitOnFirstFail bool
// CRDRules defines custom readiness rules for CRDs.
CRDRules []CRDConditionRule
}
RunnerOptions controls tracking behavior.
Click to show internal directories.
Click to hide internal directories.