k8s

package
v1.17.7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 33 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

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(ctx context.Context) ([]*daemon.PodInfo, error)
	GetPod(ctx context.Context, namespace, name string, cache bool) (*daemon.PodInfo, error)
	PodExist(ctx context.Context, namespace, name string) (bool, error)

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

	PatchNodeAnnotations(ctx context.Context, anno map[string]string) error
	PatchPodIPInfo(ctx context.Context, 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

	GetRestConfig() *rest.Config
}

Kubernetes operation set

func NewK8S

func NewK8S(daemonMode string, globalConfig *daemon.Config, namespace string) (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