Documentation ¶
Index ¶
- func ValidateCredentials(ctx context.Context, dc *kubermaticv1.DatacenterSpecVSphere, ...) error
- type Folder
- type NetworkInfo
- type RESTSession
- type Session
- type VSphere
- func (v *VSphere) CleanUpCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, ...) (*kubermaticv1.Cluster, error)
- func (v *VSphere) DefaultCloudSpec(ctx context.Context, spec *kubermaticv1.ClusterSpec) error
- func (v *VSphere) InitializeCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, ...) (*kubermaticv1.Cluster, error)
- func (v *VSphere) ReconcileCluster(ctx context.Context, cluster *kubermaticv1.Cluster, ...) (*kubermaticv1.Cluster, error)
- func (v *VSphere) ValidateCloudSpec(ctx context.Context, spec kubermaticv1.CloudSpec) error
- func (v *VSphere) ValidateCloudSpecUpdate(_ context.Context, oldSpec kubermaticv1.CloudSpec, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateCredentials ¶ added in v2.21.0
func ValidateCredentials(ctx context.Context, dc *kubermaticv1.DatacenterSpecVSphere, username, password string, caBundle *x509.CertPool) error
ValidateCredentials allows to verify username and password for a specific vSphere datacenter. It does so by attempting to create a new session and finding the default folder.
Types ¶
type Folder ¶
type Folder struct {
Path string
}
Folder represents a vsphere folder.
func GetVMFolders ¶
func GetVMFolders(ctx context.Context, dc *kubermaticv1.DatacenterSpecVSphere, username, password string, caBundle *x509.CertPool) ([]Folder, error)
GetVMFolders returns a slice of VSphereFolders of the datacenter from the passed cloudspec.
type NetworkInfo ¶
func GetNetworks ¶
func GetNetworks(ctx context.Context, dc *kubermaticv1.DatacenterSpecVSphere, username, password string, caBundle *x509.CertPool) ([]NetworkInfo, error)
GetNetworks returns a slice of VSphereNetworks of the datacenter from the passed cloudspec.
type RESTSession ¶ added in v2.21.0
func (*RESTSession) Logout ¶ added in v2.21.0
func (s *RESTSession) Logout(ctx context.Context)
Logout closes the idling vCenter connections.
type VSphere ¶ added in v2.22.0
type VSphere struct {
// contains filtered or unexported fields
}
VSphere represents the vsphere provider.
func NewCloudProvider ¶
func NewCloudProvider(dc *kubermaticv1.Datacenter, secretKeyGetter provider.SecretKeySelectorValueFunc, caBundle *x509.CertPool) (*VSphere, error)
NewCloudProvider creates a new vSphere provider.
func (*VSphere) CleanUpCloudProvider ¶ added in v2.22.0
func (v *VSphere) CleanUpCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)
CleanUpCloudProvider we always check if the folder is there and remove it if yes because we know its absolute path This covers cases where the finalizer was not added We also remove the finalizer if either the folder is not present or we successfully deleted it.
func (*VSphere) DefaultCloudSpec ¶ added in v2.22.0
func (v *VSphere) DefaultCloudSpec(ctx context.Context, spec *kubermaticv1.ClusterSpec) error
DefaultCloudSpec adds defaults to the cloud spec.
func (*VSphere) InitializeCloudProvider ¶ added in v2.22.0
func (v *VSphere) InitializeCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)
InitializeCloudProvider initializes the vsphere cloud provider by setting up vm folders for the cluster.
func (*VSphere) ReconcileCluster ¶ added in v2.22.0
func (v *VSphere) ReconcileCluster(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)
func (*VSphere) ValidateCloudSpec ¶ added in v2.22.0
ValidateCloudSpec validates whether a vsphere client can be constructed for the passed cloudspec and perform some additional checks on datastore config.
func (*VSphere) ValidateCloudSpecUpdate ¶ added in v2.22.0
func (v *VSphere) ValidateCloudSpecUpdate(_ context.Context, oldSpec kubermaticv1.CloudSpec, newSpec kubermaticv1.CloudSpec) error
ValidateCloudSpecUpdate verifies whether an update of cloud spec is valid and permitted.