node

package
v0.0.0-...-d0acd22 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeSimFinalizer   = "sim.k8s.io/NodeFinal"
	RegionLabelKey     = "sim.k8s.io/region"
	ManageLabelKey     = "sim.k8s.io/managed"
	ManageLabelValue   = "true"
	UniqueLabelKey     = "sim.k8s.io/id"
	NodeOS             = "linux"
	NodeArch           = "amd64"
	NodeOSImage        = "CentOS Linux 7 (Core)"
	NodeKernel         = "3.10.0.el7.x86_64"
	NodeKubeletVersion = "v1.19.1"
	NodeDockerVersion  = "docker://18.6.3"

	// Condition
	KubeletMessage      = "kubelet is ready."
	DiskMessage         = "kubelet has sufficient disk space available"
	MemoryMessage       = "kubelet has sufficient memory available"
	DiskPressureMessage = "kubelet has no disk pressure"
	RouteMessage        = "RouteController created a route"

	// Reason
	KubeletReason      = "KubeletReady"
	DiskReason         = "KubeletHasSufficientDisk"
	MemoryReason       = "MemoryPressure"
	DiskPressureReason = "KubeletHasNoDiskPressure"
	RouteReason        = "RouteCreated"

	// Type
	OutOfDiskPressure v1.NodeConditionType = "OutOfDisk"
)

Variables

This section is empty.

Functions

func GenNode

func GenNode(nodesim *simv1.NodeSimulator) (*v1.Node, error)

Types

type SimReconciler

type SimReconciler struct {
	client.Client
	ClientSet *kubernetes.Clientset
	Log       logr.Logger
	Scheme    *runtime.Scheme
}

SimReconciler reconciles a NodeSimulator object

func (*SimReconciler) Reconcile

func (r *SimReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*SimReconciler) SetupWithManager

func (r *SimReconciler) SetupWithManager(mgr ctrl.Manager) error

func (*SimReconciler) SyncFakeNode

func (r *SimReconciler) SyncFakeNode(ctx context.Context, nodeSim *simv1.NodeSimulator)

type Updater

type Updater struct {
	Client    client.Client
	ClientSet *kubernetes.Clientset
	Queue     workqueue.RateLimitingInterface
	StopChan  chan struct{}
}

Updater reconciles a NodeSimulator object

func NewNodeUpdater

func NewNodeUpdater(updaterClient client.Client, clientSet *kubernetes.Clientset, queue workqueue.RateLimitingInterface, stopChan chan struct{}) (*Updater, error)

func (*Updater) InitUpdater

func (n *Updater) InitUpdater()

func (*Updater) Run

func (n *Updater) Run(threadiness int, stopCh chan struct{})

func (*Updater) SyncNode

func (n *Updater) SyncNode(ctx context.Context, node *v1.Node)

Jump to

Keyboard shortcuts

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