openstack

package
v2.19.12 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SecurityGroupCleanupFinalizer will instruct the deletion of the security group
	SecurityGroupCleanupFinalizer = "kubermatic.io/cleanup-openstack-security-group"
	// OldNetworkCleanupFinalizer will instruct the deletion of all network components. Router, Network, Subnet
	// Deprecated: Got split into dedicated finalizers
	OldNetworkCleanupFinalizer = "kubermatic.io/cleanup-openstack-network"

	// NetworkCleanupFinalizer will instruct the deletion of the network
	NetworkCleanupFinalizer = "kubermatic.io/cleanup-openstack-network-v2"
	// SubnetCleanupFinalizer will instruct the deletion of the subnet
	SubnetCleanupFinalizer = "kubermatic.io/cleanup-openstack-subnet-v2"
	// RouterCleanupFinalizer will instruct the deletion of the router
	RouterCleanupFinalizer = "kubermatic.io/cleanup-openstack-router-v2"
	// RouterSubnetLinkCleanupFinalizer will instruct the deletion of the link between the router and the subnet
	RouterSubnetLinkCleanupFinalizer = "kubermatic.io/cleanup-openstack-router-subnet-link-v2"
)

Variables

This section is empty.

Functions

func GetAvailabilityZones

func GetAvailabilityZones(authURL, region string, credentials *resources.OpenstackCredentials, caBundle *x509.CertPool) ([]osavailabilityzones.AvailabilityZone, error)

GetAvailabilityZones lists availability zones for the given CloudSpec.DatacenterName and OpenstackSpec.Region

func GetCredentialsForCluster

func GetCredentialsForCluster(cloud kubermaticv1.CloudSpec, secretKeySelector provider.SecretKeySelectorValueFunc) (*resources.OpenstackCredentials, error)

GetCredentialsForCluster returns the credentials for the passed in cloud spec or an error The user can choose three ways for authentication. The first is a token. Second through Application Credentials. The last one uses a username and password. Those methods work exclusively.

func GetFlavors

func GetFlavors(authURL, region string, credentials *resources.OpenstackCredentials, caBundle *x509.CertPool) ([]osflavors.Flavor, error)

GetFlavors lists available flavors for the given CloudSpec.DatacenterName and OpenstackSpec.Region

func GetSecurityGroups

func GetSecurityGroups(authURL, region string, credentials *resources.OpenstackCredentials, caBundle *x509.CertPool) ([]ossecuritygroups.SecGroup, error)

GetSecurityGroups lists all available security groups for the given CloudSpec.DatacenterName

func GetSubnets

func GetSubnets(authURL, region, networkID string, credentials *resources.OpenstackCredentials, caBundle *x509.CertPool) ([]ossubnets.Subnet, error)

GetSubnets list all available subnet ids for a given CloudSpec

func GetTenants

func GetTenants(authURL, region string, credentials *resources.OpenstackCredentials, caBundle *x509.CertPool) ([]osprojects.Project, error)

GetTenants lists all available tenents for the given CloudSpec.DatacenterName

Types

type NetworkWithExternalExt

type NetworkWithExternalExt struct {
	osnetworks.Network
	osextnetwork.NetworkExternalExt
}

NetworkWithExternalExt is a struct that implements all networks

func GetNetworks

func GetNetworks(authURL, region string, credentials *resources.OpenstackCredentials, caBundle *x509.CertPool) ([]NetworkWithExternalExt, error)

GetNetworks lists all available networks for the given CloudSpec.DatacenterName

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider is a struct that implements CloudProvider interface

func NewCloudProvider

func NewCloudProvider(
	dc *kubermaticv1.Datacenter,
	secretKeyGetter provider.SecretKeySelectorValueFunc,
	caBundle *x509.CertPool,
) (*Provider, error)

NewCloudProvider creates a new openstack provider.

func (*Provider) AddICMPRulesIfRequired

func (os *Provider) AddICMPRulesIfRequired(cluster *kubermaticv1.Cluster) error

func (*Provider) CleanUpCloudProvider

func (os *Provider) CleanUpCloudProvider(cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)

CleanUpCloudProvider does the clean-up in particular: removes security group and network configuration

func (*Provider) DefaultCloudSpec

func (os *Provider) DefaultCloudSpec(spec *kubermaticv1.CloudSpec) error

DefaultCloudSpec adds defaults to the cloud spec

func (*Provider) InitializeCloudProvider

func (os *Provider) InitializeCloudProvider(cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)

InitializeCloudProvider initializes a cluster, in particular creates security group and network configuration

func (*Provider) ValidateCloudSpec

func (os *Provider) ValidateCloudSpec(spec kubermaticv1.CloudSpec) error

ValidateCloudSpec validates the given CloudSpec

func (*Provider) ValidateCloudSpecUpdate

func (os *Provider) ValidateCloudSpecUpdate(oldSpec kubermaticv1.CloudSpec, newSpec kubermaticv1.CloudSpec) error

ValidateCloudSpecUpdate verifies whether an update of cloud spec is valid and permitted

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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