Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Type is the type of resources managed by the KubeVirt controllers. Type = "kubevirt" // Name is the name of the KubeVirt provider controller. Name = "provider-kubevirt" // ClusterLabel is the label to put on provider cluster objects that identifies the shoot cluster. ClusterLabel = "kubevirt.provider.extensions.gardener.cloud/cluster" // CloudControllerManagerImageName is the name of the cloud-controller-manager image. CloudControllerManagerImageName = "cloud-controller-manager" // Kubeconfig is the field in a secret where the kubevirt kubeconfig is stored in. Kubeconfig = "kubeconfig" // CloudProviderConfigName is the name of the secret containing the cloud provider config. CloudProviderConfigName = "cloud-provider-config" // CloudControllerManagerName is a constant for the name of the cloud-controller-manager. CloudControllerManagerName = "cloud-controller-manager" // MachineControllerManagerName is a constant for the name of the machine-controller-manager. MachineControllerManagerName = "machine-controller-manager" // MachineControllerManagerImageName is the name of the MachineControllerManager image. MachineControllerManagerImageName = "machine-controller-manager" // MCMProviderKubeVirtImageName is the name of the KubeVirt provider plugin image. MCMProviderKubeVirtImageName = "machine-controller-manager-provider-kubevirt" // MachineControllerManagerMonitoringConfigName is the name of the ConfigMap containing monitoring stack configurations for machine-controller-manager. MachineControllerManagerMonitoringConfigName = "machine-controller-manager-monitoring-config" // MachineControllerManagerVpaName is the name of the VerticalPodAutoscaler of the machine-controller-manager deployment. MachineControllerManagerVpaName = "machine-controller-manager-vpa" // Root disk name RootDiskName = "root-disk" )
View Source
const KubeconfigSecretKey = "kubeconfig"
Variables ¶
View Source
var ( // ChartsPath is the path to the charts ChartsPath = filepath.Join("charts") // InternalChartsPath is the path to the internal charts InternalChartsPath = filepath.Join(ChartsPath, "internal") )
Functions ¶
func GetClient ¶
GetClient creates a client from the given kubeconfig. It also returns the namespace of the kubeconfig's current context.
func GetKubeConfig ¶
func GetKubeConfig(ctx context.Context, c client.Client, secretRef corev1.SecretReference) ([]byte, error)
GetKubeConfig retrieves the kubeconfig specified by the secret reference.
Types ¶
type ClientFactory ¶
type ClientFactory interface { // GetClient creates a client from the kubeconfig saved in the "kubeconfig" field of the given secret. // It also returns the namespace of the kubeconfig's current context. GetClient(kubeconfig []byte) (client.Client, string, error) }
ClientFactory creates a client from the kubeconfig saved in the "kubeconfig" field of the given secret.
type ClientFactoryFunc ¶
ClientFactoryFunc is a function that implements ClientFactory.
type DataVolumeManager ¶
type DataVolumeManager interface { // CreateOrUpdateDataVolume creates or updates a DataVolume with the given name, labels, and spec. CreateOrUpdateDataVolume(ctx context.Context, kubeconfig []byte, name string, labels map[string]string, spec cdicorev1alpha1.DataVolumeSpec) (*cdicorev1alpha1.DataVolume, error) // DeleteDataVolume deletes the DataVolume with the given name. DeleteDataVolume(ctx context.Context, kubeconfig []byte, name string) error // ListDataVolumes lists all DataVolumes matching the given labels. ListDataVolumes(ctx context.Context, kubeconfig []byte, labels map[string]string) (*cdicorev1alpha1.DataVolumeList, error) }
DataVolumeManager manages KubeVirt DataVolumes.
func NewDataVolumeManager ¶
func NewDataVolumeManager(clientFactory ClientFactory, logger logr.Logger) DataVolumeManager
NewDataVolumeManager creates a new DataVolumeManager with the given client factory and logger.
type NetworkManager ¶
type NetworkManager interface { // CreateOrUpdateNetworkAttachmentDefinition creates or updates a NetworkAttachmentDefinition with the given name, labels, and config. CreateOrUpdateNetworkAttachmentDefinition(ctx context.Context, kubeconfig []byte, name string, labels map[string]string, config string) (*networkv1.NetworkAttachmentDefinition, error) // DeleteNetworkAttachmentDefinition deletes the NetworkAttachmentDefinition with the given name. DeleteNetworkAttachmentDefinition(ctx context.Context, kubeconfig []byte, name string) error // GetNetworkAttachmentDefinition retrieves the NetworkAttachmentDefinition with the given name and namespace. GetNetworkAttachmentDefinition(ctx context.Context, kubeconfig []byte, name, namespace string) (*networkv1.NetworkAttachmentDefinition, error) // ListNetworkAttachmentDefinitions lists all NetworkAttachmentDefinitions with the given labels. ListNetworkAttachmentDefinitions(ctx context.Context, kubeconfig []byte, labels map[string]string) (*networkv1.NetworkAttachmentDefinitionList, error) }
NetworkManager manages Multus NetworkAttachmentDefinitions.
func NewNetworkManager ¶
func NewNetworkManager(clientFactory ClientFactory, logger logr.Logger) NetworkManager
NewNetworkManager creates a new NetworkManager with the given client factory and logger.
Click to show internal directories.
Click to hide internal directories.