Documentation
¶
Overview ¶
Package diff provides a DiffEngine that computes configuration differences between old and new ClusterSpec values and classifies their update impact into in-place, reboot-required, and recreate-required categories.
It also provides helpers for merging provisioner-specific diffs into a single UpdateResult, deduplicating overlapping field names.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeProvisionerDiff ¶
func MergeProvisionerDiff(main, provisioner *clusterupdate.UpdateResult)
MergeProvisionerDiff merges provisioner-specific diff results into the main diff. Provisioner diffs may contain distribution-specific changes (node counts, etc.) that the Engine doesn't track. We avoid duplicating fields already covered by Engine by checking field names.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine computes configuration differences and classifies their impact.
func NewEngine ¶
func NewEngine(distribution v1alpha1.Distribution, provider v1alpha1.Provider) *Engine
NewEngine creates a new diff engine for the given distribution and provider.
func (*Engine) ComputeDiff ¶
func (e *Engine) ComputeDiff(oldSpec, newSpec *v1alpha1.ClusterSpec) *clusterupdate.UpdateResult
ComputeDiff compares old and new ClusterSpec and categorizes all changes.