Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SemanticEqual ¶
func SemanticEqual(c1 *unstructured.Unstructured, c2 *unstructured.Unstructured) bool
SemanticEqual returns whether the specs of the constraints are equal. It ignores status and most metadata because neither are relevant as to how a constraint is enforced. It is assumed that the author is comparing two constraints with the same GVK/namespace/name. Labels are compared because the labels of a constraint may impact functionality (e.g. whether a constraint is expected to be enforced by Kubernetes' Validating Admission Policy).
Types ¶
Click to show internal directories.
Click to hide internal directories.