utils

package
v0.11.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package utils contains some utility functions used by the virtual node controller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVirtualKubeletFlagsConsistence

func CheckVirtualKubeletFlagsConsistence(
	ctx context.Context, cl client.Client, vn *virtualkubeletv1alpha1.VirtualNode, flags ...Flag) (bool, error)

CheckVirtualKubeletFlagsConsistence checks if the VirtualKubelet args are consistent with the flag list provided. It returns true if all the flags are consistent, false otherwise. A flag is not consistent if it is present in the VirtualKubelet args with a different value.

func CheckVirtualKubeletPodAbsence

func CheckVirtualKubeletPodAbsence(ctx context.Context, cl client.Client, vn *virtualkubeletv1alpha1.VirtualNode) error

CheckVirtualKubeletPodAbsence checks if a VirtualNode's VirtualKubelet pods are absent.

func GetVirtualKubeletDeployment

func GetVirtualKubeletDeployment(ctx context.Context, cl client.Client,
	virtualNode *virtualkubeletv1alpha1.VirtualNode) (*appsv1.Deployment, error)

GetVirtualKubeletDeployment returns the VirtualKubelet Deployment of a VirtualNode.

Types

type Flag

type Flag struct {
	Name  string
	Value string
}

Flag is a VirtualKubelet flag. Name must contain the "--" prefix.

func (Flag) String

func (f Flag) String() string

String returns the flag as a string.

Jump to

Keyboard shortcuts

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