kubernetes

package
v0.0.0-...-a1b7dae Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewK8sClient

func NewK8sClient(kubeconfig string) (*kubeClient, error)

NewK8sClient discover if kubeconfig creds are inside a Pod or outside the cluster and return a clientSet

Types

type K8sClient

type K8sClient interface {
	DeletePod(ctx context.Context, pod, namespace string) error
	GenerateToBeDeletedPodList(ctx context.Context, namespace, eventReason, errorMessage string, counter, pollingInterval int) (map[string]string, error)
	PodChecks(ctx context.Context, podName, podNamespace string) error
}

type PodDetails

type PodDetails struct {
	UID               types.UID
	PodName           string
	PodNamespace      string
	ResourceVersion   string
	OwnerReferences   []metav1.OwnerReference
	Phase             v1.PodPhase
	ContainerStatuses []v1.ContainerStatus
	CreationTimestamp time.Time
	DeletionTimestamp *metav1.Time
}

PodDetails holds data associated with a Pod

type PodEvent

type PodEvent struct {
	UID             types.UID
	PodName         string
	PodNamespace    string
	ResourceVersion string
	EventType       string
	Reason          string
	Message         string
	FirstTimestamp  time.Time
	LastTimestamp   time.Time
}

PodEvent holds events data associated with a Pod

Jump to

Keyboard shortcuts

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