Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AppliedOverrides is the annotation which used to record override items an object applied. // The overrides items should be sorted alphabetically in ascending order by OverridePolicy's name. AppliedOverrides = "policy.kcloudlabs.io/applied-overrides" // AppliedClusterOverrides is the annotation which used to record override items an object applied. // The overrides items should be sorted alphabetically in ascending order by ClusterOverridePolicy's name. AppliedClusterOverrides = "policy.kcloudlabs.io/applied-cluster-overrides" )
Define annotations used by k-cloud-labs
View Source
const ( // Create operation Create = "Create" // Update operation Update = "Update" )
Define supported mutate operation
View Source
const (
// SpecField indicates the 'spec' field of a resource
SpecField = "spec"
)
Define resource filed
Variables ¶
This section is empty.
Functions ¶
func ResourceMatchSelectors ¶
func ResourceMatchSelectors(resource *unstructured.Unstructured, selectors ...policyv1alpha1.ResourceSelector) bool
ResourceMatchSelectors tells if the specific resource matches the selectors.
func ResourceMatches ¶
func ResourceMatches(resource *unstructured.Unstructured, rs policyv1alpha1.ResourceSelector) bool
ResourceMatches tells if the specific resource matches the selector.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.