agent

package
v0.0.0-...-e70fc09 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Inspired by: - https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kubelet_node_status.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(cfg *Config, stopCh <-chan struct{})

Types

type Agent

type Agent struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*Agent) CaptureOpenstackComputeData

func (a *Agent) CaptureOpenstackComputeData()

func (*Agent) CaptureOpenstackData

func (a *Agent) CaptureOpenstackData()

func (*Agent) CaptureOpenstackIdentityData

func (a *Agent) CaptureOpenstackIdentityData()

func (*Agent) CaptureOpenstackMeterData

func (a *Agent) CaptureOpenstackMeterData()

func (*Agent) CaptureOpenstackNetworkData

func (a *Agent) CaptureOpenstackNetworkData()

func (*Agent) GetHostname

func (a *Agent) GetHostname() string

GetHostname Returns the hostname as the kubelet sees it.

func (kl *Kubelet) GetHostname() string {
	return kl.hostname

func (*Agent) GetNode

func (a *Agent) GetNode() (*v1.Node, error)

GetNode returns the node info for the configured node name of this Kubelet.

func (kl *Kubelet) GetNode() (*v1.Node, error) {
	if kl.kubeClient == nil {
		return kl.initialNode()
	}
	return kl.nodeInfo.GetNodeInfo(string(kl.nodeName))

type Config

type Config struct {
	Name            string
	RemoteGrpc      string
	RemoteHttp      string
	SecureTransport bool

	Common *config.Config
}

type Dependencies

type Dependencies struct {
	Options []Option

	// Injected Dependencies
	//	Auth                    server.AuthInterface
	CAdvisorInterface cadvisor.Interface
	Cloud             cloudprovider.Interface
	//	ContainerManager        cm.ContainerManager
	//	DockerClientConfig      *dockershim.ClientConfig
	EventClient        v1core.EventsGetter
	HeartbeatClient    v1core.CoreV1Interface
	OnHeartbeatFailure func()
	KubeClient         clientset.Interface
	ExternalKubeClient clientset.Interface
	//	Mounter                 mount.Interface
	//	OOMAdjuster             *oom.OOMAdjuster
	//	OSInterface             kubecontainer.OSInterface
	//	PodConfig               *config.PodConfig
	Recorder record.EventRecorder
}

Dependencies is a bin for things we might consider "injected dependencies" -- objects constructed at runtime that are necessary for running the Kubelet. This is a temporary solution for grouping these objects while we figure out a more comprehensive dependency injection story for the Kubelet.

type Option

type Option func(Agent)

Option is a functional option type for Kubelet

Directories

Path Synopsis
app

Jump to

Keyboard shortcuts

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