Documentation ¶
Index ¶
- Constants
- func DescribeInstanceType(ctx context.Context, kubeconfig string, it *kubevirtv1.InstancetypeMatcher) (*provider.NodeCapacity, error)
- func GenerateKubeconfigWithToken(restConfig *restclient.Config, sa *corev1.ServiceAccount, token string) ([]byte, error)
- func GetCredentialsForCluster(cloud kubermaticv1.CloudSpec, ...) (kubeconfig string, err error)
- func GetKubermaticStandardInstancetypes(client ctrlruntimeclient.Client, getter kvmanifests.ManifestFSGetter) []kvinstancetypev1alpha1.VirtualMachineInstancetype
- func GetKubermaticStandardPreferences(client ctrlruntimeclient.Client, getter kvmanifests.ManifestFSGetter) []kvinstancetypev1alpha1.VirtualMachinePreference
- func ListStorageClasses(ctx context.Context, client ctrlruntimeclient.Client, ...) (apiv2.StorageClassList, error)
- func NewCloudProvider(dc *kubermaticv1.Datacenter, ...) (provider.CloudProvider, error)
- func ReconcileInfraTokenAccess(ctx context.Context, namespace string, client ctrlruntimeclient.Client) error
- type Client
- type ClientOptions
Constants ¶
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
func GetKubermaticStandardInstancetypes(client ctrlruntimeclient.Client, getter kvmanifests.ManifestFSGetter) []kvinstancetypev1alpha1.VirtualMachineInstancetype
GetKubermaticStandardInstancetypes returns the Kubermatic standard VirtualMachineInstancetypes.
func GetKubermaticStandardPreferences ¶ added in v2.22.0
func GetKubermaticStandardPreferences(client ctrlruntimeclient.Client, getter kvmanifests.ManifestFSGetter) []kvinstancetypev1alpha1.VirtualMachinePreference
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 NewCloudProvider ¶
func NewCloudProvider(dc *kubermaticv1.Datacenter, secretKeyGetter provider.SecretKeySelectorValueFunc) (provider.CloudProvider, error)
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.