diff

package
v5.36.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

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