k8s_utils

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Unlicense Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, cli client.Client, objects []runtime.Object, logger logr.Logger) error

func Delete

func Delete(ctx context.Context, cli client.Client, objects []runtime.Object, logger logr.Logger) error

func GetPodLog

func GetPodLog(ctx context.Context, config *rest.Config, pod *corev1.Pod, containerName string) (string, error)

func IsJobCompleted

func IsJobCompleted(job *batchv1.Job) bool

func IsPodCompleted

func IsPodCompleted(pod *corev1.Pod) bool

func IsPodRunning added in v0.4.0

func IsPodRunning(pod *corev1.Pod) bool

func ParseK8sObjects

func ParseK8sObjects(y string) ([]runtime.Object, error)

func PopNamespaceFromObjectList added in v0.5.0

func PopNamespaceFromObjectList(objects []runtime.Object) (nsObject runtime.Object, otherObjects []runtime.Object)

func RestartDeamonSet added in v0.4.0

func RestartDeamonSet(ctx context.Context, cli client.Client, dsUpdate *appsv1.DaemonSet) error

RestartDeamonSet restarts all pods that belong to the daemonset

Types

type KubeQuerySecretsMethod added in v0.5.0

type KubeQuerySecretsMethod func(ctx context.Context) (*corev1.SecretList, error)

func QuerySecrets added in v0.5.0

func QuerySecrets(cli client.Client, opts ...client.ListOption) KubeQuerySecretsMethod

func QuerySecretsInNamespace added in v0.5.0

func QuerySecretsInNamespace(cli client.Client, namespace string) KubeQuerySecretsMethod

Jump to

Keyboard shortcuts

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