util

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check added in v1.1.0

func Check(ctx context.Context, c client.Client, obj runtime.Object, f CheckFn) bool

func ContainsString

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

func Create added in v1.1.0

func Create(ctx context.Context, c client.Client, obj runtime.Object, f CreateFn) error

func DutyOfCNI added in v1.1.0

func DutyOfCNI(metaOld metav1.Object, metaNew metav1.Object) bool

func EnvNamespace added in v1.1.0

func EnvNamespace() string

func GetNodeIP added in v1.1.0

func GetNodeIP(node corev1.Node) net.IP

Find node first NodeInternalIP, should check result

func GetNodeName added in v1.1.0

func GetNodeName() string

func IsDeletionCandidate added in v1.1.0

func IsDeletionCandidate(obj metav1.Object, finalizer string) bool

IsDeletionCandidate checks if object is candidate to be deleted

func NeedToAddFinalizer added in v1.1.0

func NeedToAddFinalizer(obj metav1.Object, finalizer string) bool

NeedToAddFinalizer checks if need to add finalizer to object

func RemoveString

func RemoveString(slice []string, s string) (result []string)

Types

type CheckFn added in v1.1.0

type CheckFn func() bool

type CreateFn added in v1.1.0

type CreateFn func() error

Jump to

Keyboard shortcuts

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