Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Normalize ¶
func Normalize(obj *unstructured.Unstructured) *unstructured.Unstructured
Normalize removes cluster-managed fields from a resource for clean comparison.
Types ¶
type DiffResult ¶
type DiffResult struct {
APIVersion string
Kind string
Name string
Namespace string
Status DiffStatus
Diff string // unified diff text
}
DiffResult holds the comparison result for a single resource.
func Compare ¶
func Compare(local, cluster *unstructured.Unstructured) (*DiffResult, error)
Compare compares a local resource against a cluster resource.
func (*DiffResult) ResourceKey ¶
func (d *DiffResult) ResourceKey() string
ResourceKey returns a human-readable identifier for the resource.
type DiffStatus ¶
type DiffStatus string
DiffStatus represents the status of a resource comparison.
const ( StatusUnchanged DiffStatus = "unchanged" StatusChanged DiffStatus = "changed" StatusNew DiffStatus = "new" StatusDeleted DiffStatus = "deleted" )
Click to show internal directories.
Click to hide internal directories.