Documentation ¶
Overview ¶
Package selectors contains exceptions related utilities, including check the validity of selector, treeSelector, and noneSelector, and parsing these three selectors.
Index ¶
- func GetNoneSelector(inst *unstructured.Unstructured) (bool, error)
- func GetNoneSelectorAnnotation(inst *unstructured.Unstructured) string
- func GetSelector(inst *unstructured.Unstructured) (labels.Selector, error)
- func GetSelectorAnnotation(inst *unstructured.Unstructured) string
- func GetTreeSelector(inst *unstructured.Unstructured) (labels.Selector, error)
- func GetTreeSelectorAnnotation(inst *unstructured.Unstructured) string
- func ShouldPropagate(inst *unstructured.Unstructured, nsLabels labels.Set) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNoneSelector ¶
func GetNoneSelector(inst *unstructured.Unstructured) (bool, error)
GetNoneSelector returns true indicates that user do not want this object to be propagated
func GetNoneSelectorAnnotation ¶
func GetNoneSelectorAnnotation(inst *unstructured.Unstructured) string
func GetSelector ¶
func GetSelector(inst *unstructured.Unstructured) (labels.Selector, error)
GetSelector returns the selector on a given object if it exists
func GetSelectorAnnotation ¶
func GetSelectorAnnotation(inst *unstructured.Unstructured) string
func GetTreeSelector ¶
func GetTreeSelector(inst *unstructured.Unstructured) (labels.Selector, error)
GetTreeSelector is similar to a regular selector, except that it adds the LabelTreeDepthSuffix to every string To transform a tree selector into a regular label selector, we follow these steps: 1. get the treeSelector annotation if it exists 2. convert the annotation string to a slice of strings seperated by comma, because user is allowed to put multiple selectors 3. append the LabelTreeDepthSuffix to each of the treeSelector string 4. combine them into a single string connected by comma
func GetTreeSelectorAnnotation ¶
func GetTreeSelectorAnnotation(inst *unstructured.Unstructured) string
func ShouldPropagate ¶
func ShouldPropagate(inst *unstructured.Unstructured, nsLabels labels.Set) (bool, error)
Types ¶
This section is empty.