utils

package
v0.4.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

func ContainsString(list []string, s string) bool

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 MaxInt

func MaxInt(val0 int, vals ...int) int

MaxInt returns the larger of x or y.

func MergeResult

func MergeResult(r1, r2 reconcile.Result) reconcile.Result

MergeResult use to merge two reconcile.Result struct

func MinInt

func MinInt(val0 int, vals ...int) int

MinInt returns the larger of x or y.

func RemoveString

func RemoveString(list []string, s string) []string

RemoveString remove a specifici string from a slice

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