utils

package
v0.10.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: 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, vkopts *vkforge.VirtualKubeletOpts, 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, vkopts *vkforge.VirtualKubeletOpts) error

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

func GetVirtualKubeletDeployment

func GetVirtualKubeletDeployment(
	ctx context.Context, cl client.Client, virtualNode *virtualkubeletv1alpha1.VirtualNode,
	vkopts *vkforge.VirtualKubeletOpts) (*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