selectors

package
v0.0.0-...-44dad58 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package selectors contains exceptions related utilities, including check the validity of selector, treeSelector, and noneSelector, and parsing these three selectors.

Index

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.

Jump to

Keyboard shortcuts

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