util

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check added in v0.4.4

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 v0.4.4

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

func DutyOfCNI added in v0.4.4

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

func EnvNamespace added in v0.5.0

func EnvNamespace() string

func GetNodeIP added in v0.4.4

func GetNodeIP(node corev1.Node) net.IP

Find node first NodeInternalIP, should check result

func GetNodeName added in v0.4.4

func GetNodeName() string

func IsDeletionCandidate added in v0.4.4

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

IsDeletionCandidate checks if object is candidate to be deleted

func NeedToAddFinalizer added in v0.4.4

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 v0.4.4

type CheckFn func() bool

type CreateFn added in v0.4.4

type CreateFn func() error

Jump to

Keyboard shortcuts

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