utils

package
v1.2.4-policy Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var APIExtensionsClient apiextensionsclient.Interface

APIExtensionsClient k8s client set

View Source
var (
	// DefaultPatchBackoff for patch status field
	DefaultPatchBackoff = wait.Backoff{
		Duration: 1 * time.Second,
		Steps:    3,
		Factor:   2,
		Jitter:   1.1,
	}
)

K8sClient k8s client set

NetworkClient network client set

Functions

func IsDaemonSetPod

func IsDaemonSetPod(pod *corev1.Pod) bool

IsDaemonSetPod pod is create by daemonSet

func IsJobPod

func IsJobPod(pod *corev1.Pod) bool

IsJobPod pod is create by Job

func IsStsPod

func IsStsPod(pod *corev1.Pod) bool

IsStsPod pod is sts

func IsWindowsOS added in v1.3.0

func IsWindowsOS() bool

func Max

func Max(a, b int) int

func Minimal

func Minimal(a int) int

func NormalizePath added in v1.3.0

func NormalizePath(path string) string

NormalizePath returns the normal path in heterogeneous platform.

func PodSandboxExited

func PodSandboxExited(p *corev1.Pod) bool

PodSandboxExited pod sandbox is exited

func RegisterClients

func RegisterClients(restConfig *rest.Config)

RegisterClients create all k8s clients

func SetStsKinds added in v1.2.0

func SetStsKinds(kids []string)

SetStsKinds set custom sts workload kinds

func TrimStr

func TrimStr(s string, l int) string

TrimStr witch len

Types

This section is empty.

Jump to

Keyboard shortcuts

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