kubevirt

package
v2.25.6 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FinalizerNamespace will ensure the deletion of the dedicated namespace.
	FinalizerNamespace = "kubermatic.k8c.io/cleanup-kubevirt-namespace"
	// FinalizerClonerRoleBinding will ensure the deletion of the DataVolume cloner role-binding.
	FinalizerClonerRoleBinding = "kubermatic.k8c.io/cleanup-kubevirt-cloner-rbac"
)

Variables

This section is empty.

Functions

func DescribeInstanceType added in v2.22.0

func DescribeInstanceType(ctx context.Context, kubeconfig string, it *kubevirtv1.InstancetypeMatcher) (*provider.NodeCapacity, error)

DescribeInstanceType returns the NodeCapacity from the VirtualMachine instancetype.

func GenerateKubeconfigWithToken added in v2.22.0

func GenerateKubeconfigWithToken(restConfig *restclient.Config, sa *corev1.ServiceAccount, token string) ([]byte, error)

func GetCredentialsForCluster

func GetCredentialsForCluster(cloud kubermaticv1.CloudSpec, secretKeySelector provider.SecretKeySelectorValueFunc) (kubeconfig string, err error)

GetCredentialsForCluster returns the credentials for the passed in cloud spec or an error.

func GetKubermaticStandardInstancetypes added in v2.22.0

GetKubermaticStandardInstancetypes returns the Kubermatic standard VirtualMachineInstancetypes.

func GetKubermaticStandardPreferences added in v2.22.0

GetKubermaticStandardPreferences returns the Kubermatic standard VirtualMachinePreferences.

func ListStorageClasses added in v2.21.0

func ListStorageClasses(ctx context.Context, client ctrlruntimeclient.Client, annotationFilter storageClassAnnotationFilter) (apiv2.StorageClassList, error)

ListStorageClasses returns list of storage classes filtered by annotations.

func ReconcileInfraTokenAccess added in v2.22.0

func ReconcileInfraTokenAccess(ctx context.Context, namespace string, client ctrlruntimeclient.Client) error

ReconcileInfraTokenAccess generates a service account token for KubeVirt CSI access.

Types

type Client added in v2.22.0

type Client struct {
	ctrlruntimeclient.Client
	// RestConfig represents a rest client configuration
	RestConfig *restclient.Config
}

Client represents a struct that includes controller runtime client and rest configuration that is needed for service accounts kubeconfig generation.

func NewClient added in v2.22.0

func NewClient(kubeconfig string, opts ClientOptions) (*Client, error)

NewClient returns controller runtime client that points to KubeVirt infra cluster.

func NewFakeClient added in v2.22.0

func NewFakeClient(kubeconfig string, opts ClientOptions) (*Client, error)

NewFakeClient returns controller runtime fake client.

type ClientOptions added in v2.22.0

type ClientOptions struct {
	// ControllerRuntimeOptions represents the options coming from controller runtime.
	ControllerRuntimeOptions ctrlruntimeclient.Options
	// FakeObjects allows to inject custom objects for testing.
	FakeObjects []ctrlruntimeclient.Object
	// contains filtered or unexported fields
}

ClientOptions allows to pass specific options that influence the client behaviour.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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