kubernetes

package
v0.0.0-...-929b9c4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Black   = "\033[1;30m%s\033[0m"
	Red     = "\033[1;31m%s\033[0m"
	Green   = "\033[1;32m%s\033[0m"
	Yellow  = "\033[1;33m%s\033[0m"
	Blue    = "\033[1;34m%s\033[0m"
	Magenta = "\033[1;35m%s\033[0m"
	Cyan    = "\033[1;36m%s\033[0m"
	White   = "\033[1;37m%s\033[0m"
)
View Source
const (
	SUFFIX_CONFIG_MAP = "config-map"
	CONFIG_POD_REGEX  = "POD_REGEX"
	CONFIG_NAMESPACES = "NAMESPACES"
	CONFIG_STOPPED    = "STOPPED"
)
View Source
const CONFIGURATION_FLAG_CAPTURE_STOPPED = 1 << 0
View Source
const (
	SELF_RESOURCES_PREFIX = "kubeshark-"
)

Variables

View Source
var (
	SentryWriter *sentry.Writer
)

Functions

func GetAllTargetPods

func GetAllTargetPods() []*v1.Pod

func GetClusterID

func GetClusterID(watcher *Watcher) (string, error)

GetClusterID returns the UID field of the `kube-system` namespace object This is used as a unique identifier for the cluster

func GetSelectedTargetPods

func GetSelectedTargetPods() []*v1.Pod

func GetSelfNamespace

func GetSelfNamespace() string

func GetSelfPodName

func GetSelfPodName() string

func GetThisNodeName

func GetThisNodeName(watcher *Watcher) (name string, err error)

func SetAllTargetPods

func SetAllTargetPods(pods []*v1.Pod)

func SetSelectedTargetPods

func SetSelectedTargetPods(pods []*v1.Pod)

func SyncConfig

func SyncConfig(configMap *v1.ConfigMap) (*regexp2.Regexp, []string, uint32)

Types

type PodInfo

type PodInfo struct {
	Pids         []uint32
	CgroupV2Path string
	CgroupIDs    []uint64
}

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewFromInCluster

func NewFromInCluster(errOut chan error, callback callbackPodsChanged) *Watcher

func (*Watcher) Start

func (watcher *Watcher) Start(ctx context.Context, clusterMode bool)

Jump to

Keyboard shortcuts

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