k8s

package
v1.11.5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BYTE = 1 << (10 * iota)
	KILOBYTE
	MEGABYTE
	GIGABYTE
	TERABYTE
)

bandwidth limit unit

View Source
const (
	ConditionFalse = "false"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Kubernetes

type Kubernetes interface {
	GetLocalPods() ([]*daemon.PodInfo, error)
	GetPod(ctx context.Context, namespace, name string, cache bool) (*daemon.PodInfo, error)
	PodExist(namespace, name string) (bool, error)

	GetServiceCIDR() *types.IPNetSet
	SetNodeAllocatablePod(count int) error

	PatchNodeAnnotations(anno map[string]string) error
	PatchPodIPInfo(info *daemon.PodInfo, ips string) error
	PatchNodeIPResCondition(status corev1.ConditionStatus, reason, message string) error
	RecordNodeEvent(eventType, reason, message string)
	RecordPodEvent(podName, podNamespace, eventType, reason, message string) error
	GetNodeDynamicConfigLabel() string
	GetDynamicConfigWithName(ctx context.Context, name string) (string, error)
	SetCustomStatefulWorkloadKinds(kinds []string) error

	GetTrunkID() string

	GetClient() client.Client

	NodeName() string

	Node() *corev1.Node
}

Kubernetes operation set

func NewK8S

func NewK8S(daemonMode string, globalConfig *daemon.Config) (Kubernetes, error)

NewK8S return Kubernetes service by pod spec and daemon mode

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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