util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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