Documentation ¶
Index ¶
- Constants
- func GetCACertificate(kubeClient kubernetes.Interface) []byte
- func GetCloud(kubeClient kubernetes.Interface, machine *machinev1.Machine) (clientconfig.Cloud, error)
- func GetCloudFromSecret(kubeClient kubernetes.Interface, namespace string, secretName string, ...) (clientconfig.Cloud, error)
- func GetProviderClient(cloud clientconfig.Cloud, cert []byte) (*gophercloud.ProviderClient, error)
- func MachineSpecFromProviderSpec(providerSpec machinev1.ProviderSpec) (*machinev1alpha1.OpenstackProviderSpec, error)
- type InstanceService
- func (is *InstanceService) CreateServerGroup(name string) (*servergroups.ServerGroup, error)
- func (is *InstanceService) DoesAvailabilityZoneExist(azName string) error
- func (is *InstanceService) DoesFlavorExist(flavorName string) error
- func (is *InstanceService) DoesImageExist(imageName string) error
- func (is *InstanceService) GetFlavorID(flavorName string) (string, error)
- func (is *InstanceService) GetFlavorInfo(flavorID string) (flavor *flavors.Flavor, err error)
- func (is *InstanceService) GetServerGroupByID(id string) (*servergroups.ServerGroup, error)
- func (is *InstanceService) GetServerGroupsByName(name string) ([]servergroups.ServerGroup, error)
Constants ¶
View Source
const (
CloudsSecretKey = "clouds.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func GetCACertificate ¶
func GetCACertificate(kubeClient kubernetes.Interface) []byte
GetCACertificate gets the CA certificate from the configmap
func GetCloud ¶
func GetCloud(kubeClient kubernetes.Interface, machine *machinev1.Machine) (clientconfig.Cloud, error)
GetCloud fetches cloud credentials from a secret and return a parsed Cloud structure
func GetCloudFromSecret ¶
func GetCloudFromSecret(kubeClient kubernetes.Interface, namespace string, secretName string, cloudName string) (clientconfig.Cloud, error)
func GetProviderClient ¶
func GetProviderClient(cloud clientconfig.Cloud, cert []byte) (*gophercloud.ProviderClient, error)
GetProviderClient returns an authenticated provider client based on values in the cloud structure
func MachineSpecFromProviderSpec ¶
func MachineSpecFromProviderSpec(providerSpec machinev1.ProviderSpec) (*machinev1alpha1.OpenstackProviderSpec, error)
MachineSpecFromProviderSpec unmarshals a provider status into an OpenStack Machine Status type
Types ¶
type InstanceService ¶
type InstanceService struct {
// contains filtered or unexported fields
}
func NewInstanceService ¶
func NewInstanceService() (*InstanceService, error)
func NewInstanceServiceFromCloud ¶
func NewInstanceServiceFromCloud(cloud clientconfig.Cloud, cert []byte) (*InstanceService, error)
func NewInstanceServiceFromMachine ¶
func NewInstanceServiceFromMachine(kubeClient kubernetes.Interface, machine *machinev1.Machine) (*InstanceService, error)
TODO: Eventually we'll have a NewInstanceServiceFromCluster too
func (*InstanceService) CreateServerGroup ¶
func (is *InstanceService) CreateServerGroup(name string) (*servergroups.ServerGroup, error)
func (*InstanceService) DoesAvailabilityZoneExist ¶
func (is *InstanceService) DoesAvailabilityZoneExist(azName string) error
DoesAvailabilityZoneExist return an error if AZ with the given name doesn't exist, and nil otherwise
func (*InstanceService) DoesFlavorExist ¶
func (is *InstanceService) DoesFlavorExist(flavorName string) error
DoesFlavorExist returns nil if exactly one flavor exists with the given name.
func (*InstanceService) DoesImageExist ¶
func (is *InstanceService) DoesImageExist(imageName string) error
DoesImageExist returns nil if exactly one image exists with the given name.
func (*InstanceService) GetFlavorID ¶
func (is *InstanceService) GetFlavorID(flavorName string) (string, error)
func (*InstanceService) GetFlavorInfo ¶
func (is *InstanceService) GetFlavorInfo(flavorID string) (flavor *flavors.Flavor, err error)
func (*InstanceService) GetServerGroupByID ¶
func (is *InstanceService) GetServerGroupByID(id string) (*servergroups.ServerGroup, error)
func (*InstanceService) GetServerGroupsByName ¶
func (is *InstanceService) GetServerGroupsByName(name string) ([]servergroups.ServerGroup, error)
Click to show internal directories.
Click to hide internal directories.