Documentation ¶
Overview ¶
Package utils contains set of utils functions
Index ¶
- func BuildInfoLabels(obj *metav1.ObjectMeta) ([]string, []string)
- func ContainsString(list []string, s string) bool
- func ConvertLabelSelector(logger logr.Logger, inSelector *metav1.LabelSelector) (labels.Selector, error)
- func GetLabelsValues(obj *metav1.ObjectMeta) ([]string, []string)
- func MaxInt(val0 int, vals ...int) int
- func MergeResult(r1, r2 reconcile.Result) reconcile.Result
- func MinInt(val0 int, vals ...int) int
- func RemoveString(list []string, s string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildInfoLabels ¶
func BuildInfoLabels(obj *metav1.ObjectMeta) ([]string, []string)
BuildInfoLabels build the lists of label keys and values from the ObjectMeta Labels.
func ContainsString ¶
ContainsString check if a slice contains a specific string.
func ConvertLabelSelector ¶
func ConvertLabelSelector(logger logr.Logger, inSelector *metav1.LabelSelector) (labels.Selector, error)
ConvertLabelSelector converts a "k8s.io/apimachinery/pkg/apis/meta/v1".LabelSelector as found in manifests spec section into a "k8s.io/apimachinery/pkg/labels".Selector to be used to filter list operations.
func GetLabelsValues ¶
func GetLabelsValues(obj *metav1.ObjectMeta) ([]string, []string)
GetLabelsValues returns name and namespace as label values.
func MergeResult ¶
MergeResult use to merge two reconcile.Result struct.
func RemoveString ¶
RemoveString remove a specifici string from a slice.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package affinity contains Pod affinity functions helper.
|
Package affinity contains Pod affinity functions helper. |
Package comparison contains object comparison functions.
|
Package comparison contains object comparison functions. |
Package enqueue contains Object enqueue helpers.
|
Package enqueue contains Object enqueue helpers. |
Package pod contains helper functions around Pod object.
|
Package pod contains helper functions around Pod object. |
Click to show internal directories.
Click to hide internal directories.