cloudprovider

package
v0.0.0-...-d6a6b0e Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloud

type Cloud interface {
	// CreateWindowsVM creates a Windows VM for a given cloud provider
	CreateWindowsVM() (types.WindowsVM, error)
	// CreateWindowsVMWithPrivateSubnet creates a Windows VM for a given cloud provider in a private subnet
	CreateWindowsVMWithPrivateSubnet() (windowsVM types.WindowsVM, err error)
	// DestroyWindowsVMs uses 'windows-node-installer.json' file that contains IDs of created instance and
	// security group and deletes them.
	// Example 'windows-node-installer.json' file:
	// {
	//	"InstanceIDs": ["<example-instance-ID>"],
	//  "SecurityGroupIDs": ["<example-security-group-ID>"]
	// {
	// It deletes the security group only if the group is not associated with any instance.
	// The association between the instance and security group are available from individual cloud provider.
	DestroyWindowsVMs() error
	// DestroyWindowsVM destroys a specific instance that was passed to it. It returns an error when the WindowsVM
	// deletion fails. It takes the instanceID as argument depending on the cloud provider implementation the
	// instanceID. Let's if we want to slice of instances instead of individual instances
	DestroyWindowsVM(string) error
}

Cloud is the interface that needs to be implemented per provider to allow support for creating Windows nodes on that provider.

func CloudProviderFactory

func CloudProviderFactory(kubeconfigPath, credentialPath, credentialAccountID, resourceTrackerDir,
	imageID, instanceType, sshKey, privateKeyPath string) (Cloud, error)

CloudProviderFactory returns cloud specific interface for performing necessary functions related to creating or destroying an instance. The factory takes in kubeconfig of an existing OpenShift cluster and a cloud vendor specific credential file. Since the credential file may contain multiple accounts and the default account name/ID varies between providers, this function requires specifying the credentialAccountID of the user's credential account. The resourceTrackerDir is where the `windows-node-installer.json` file which contains IDs of created instance and security group will be created. privateKeyPath is the path of the private key which can be used to decrypt the password for the Windows VM created

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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