k8s

package
v1.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForUnexpectedFieldChange

func CheckForUnexpectedFieldChange(a, b metav1.Object) bool

CheckForUnexpectedFieldChange compares two Kubernetes objects and returns true if their annotations, labels, or spec have changed. This is useful for detecting unexpected modifications during reconciliation.

The function compares:

  • Annotations (via GetAnnotations)
  • Labels (via GetLabels)
  • Spec (using reflection to access the Spec field, with semantic equality)

Status and finalizers are intentionally not compared, as these are expected to change during reconciliation.

This function uses reflection to access the Spec field, so no explicit GetSpec() method is required. The objects must have a field named "Spec".

Types

This section is empty.

Jump to

Keyboard shortcuts

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