node

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKernelVersion

func GetKernelVersion(kernelVersion string) (version *semver.Version, err error)

GetKernelVersion receives string with the kernel version information in the following format: "X.Y.Z-<Number>-<Description>". For example, "5.4.0-66-generic" returns kernel version - major and minor. For example, "5.4"

func GetNodeDaemonsetPodsSelector

func GetNodeDaemonsetPodsSelector() labels.Selector

GetNodeDaemonsetPodsSelector returns a label-selector to use in the List method

func GetNodeKernelVersion

func GetNodeKernelVersion(node *corev1.Node) (version *semver.Version, err error)

GetNodeKernelVersion returns kernel version of Node

func GetOSNameAndVersion

func GetOSNameAndVersion(osInfo string) (name, version string, err error)

GetOSNameAndVersion receives string with the OS information in th following format: "<OS name> <OS version> <Extra information>". For example, "Ubuntu 18.04.4 LTS" returns os name with the lower case and major and minor version. For example, "ubuntu", "18.04"

Types

type Node

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

Node controls csi-baremetal-node

func NewNode

func NewNode(clientset kubernetes.Interface,
	podSecurityPolicyVerifier securityverifier.SecurityVerifier,
	securityContextConstraintsVerifier securityverifier.SecurityVerifier,
	logger *logrus.Entry,
) *Node

NewNode creates a Node object

func (*Node) Uninstall

func (n *Node) Uninstall(ctx context.Context, _ *csibaremetalv1.Deployment) error

Uninstall deletes platform-label on each node in cluster

func (*Node) Update

func (n *Node) Update(ctx context.Context, csi *csibaremetalv1.Deployment, scheme *runtime.Scheme) error

Update updates csi-baremetal-node or creates if not found

type PlatformDescription

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

PlatformDescription contains info to deploy specific node daemonsets tag - the prefix for daemonset and image: csi-baremetal-node-<tag> labeltag - label for node selctor checkVersion - func to match related version

func (*PlatformDescription) DaemonsetName

func (pd *PlatformDescription) DaemonsetName(baseName string) string

DaemonsetName constructs name of daemonset based on tag

func (*PlatformDescription) NodeImage

func (pd *PlatformDescription) NodeImage(baseImage *components.Image) *components.Image

NodeImage constructs name of image based on tag and updates Image

type Set

type Set map[string]bool

Set is needed to check if one type of platform is exists in current cluster

Jump to

Keyboard shortcuts

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