Documentation ¶
Index ¶
- Constants
- func DescribeFlavor(credentials *resources.OpenstackCredentials, authURL, region string, ...) (*provider.NodeCapacity, error)
- func GetAvailabilityZones(authURL, region string, credentials *resources.OpenstackCredentials, ...) ([]osavailabilityzones.AvailabilityZone, error)
- func GetCredentialsForCluster(cloud kubermaticv1.CloudSpec, ...) (*resources.OpenstackCredentials, error)
- func GetFlavors(authURL, region string, credentials *resources.OpenstackCredentials, ...) ([]osflavors.Flavor, error)
- func GetSecurityGroups(ctx context.Context, authURL, region string, ...) ([]ossecuritygroups.SecGroup, error)
- func GetSubnetPools(ctx context.Context, authURL, region string, ...) ([]ossubnetpools.SubnetPool, error)
- func GetSubnets(ctx context.Context, authURL, region, networkID string, ...) ([]ossubnets.Subnet, error)
- func GetTenants(authURL, region string, credentials *resources.OpenstackCredentials, ...) ([]osprojects.Project, error)
- func ValidateCredentials(authURL, region string, credentials *resources.OpenstackCredentials, ...) error
- type NetworkWithExternalExt
- type Provider
- func (os *Provider) CleanUpCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, ...) (*kubermaticv1.Cluster, error)
- func (os *Provider) ClusterNeedsReconciling(cluster *kubermaticv1.Cluster) bool
- func (os *Provider) DefaultCloudSpec(ctx context.Context, spec *kubermaticv1.ClusterSpec) error
- func (os *Provider) InitializeCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, ...) (*kubermaticv1.Cluster, error)
- func (os *Provider) ReconcileCluster(ctx context.Context, cluster *kubermaticv1.Cluster, ...) (*kubermaticv1.Cluster, error)
- func (os *Provider) ValidateCloudSpec(ctx context.Context, spec kubermaticv1.CloudSpec) error
- func (os *Provider) ValidateCloudSpecUpdate(_ context.Context, oldSpec kubermaticv1.CloudSpec, ...) error
Constants ¶
const ( // SecurityGroupCleanupFinalizer will instruct the deletion of the security group. SecurityGroupCleanupFinalizer = "kubermatic.k8c.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.k8c.io/cleanup-openstack-network" // NetworkCleanupFinalizer will instruct the deletion of the network. NetworkCleanupFinalizer = "kubermatic.k8c.io/cleanup-openstack-network-v2" // SubnetCleanupFinalizer will instruct the deletion of the IPv4 subnet. SubnetCleanupFinalizer = "kubermatic.k8c.io/cleanup-openstack-subnet-v2" // IPv6SubnetCleanupFinalizer will instruct the deletion of the IPv6 subnet. IPv6SubnetCleanupFinalizer = "kubermatic.k8c.io/cleanup-openstack-subnet-ipv6" // RouterCleanupFinalizer will instruct the deletion of the router. RouterCleanupFinalizer = "kubermatic.k8c.io/cleanup-openstack-router-v2" // RouterSubnetLinkCleanupFinalizer will instruct the deletion of the link between the router and the IPv4 subnet. RouterSubnetLinkCleanupFinalizer = "kubermatic.k8c.io/cleanup-openstack-router-subnet-link-v2" // RouterIPv6SubnetLinkCleanupFinalizer will instruct the deletion of the link between the router and the IPv6 subnet. RouterIPv6SubnetLinkCleanupFinalizer = "kubermatic.k8c.io/cleanup-openstack-router-subnet-link-ipv6" // FloatingIPPoolIDAnnotation stores the ID of the floating IP pool (external network). FloatingIPPoolIDAnnotation = "kubermatic.k8c.io/openstack-floating-ip-pool-id" )
Variables ¶
This section is empty.
Functions ¶
func DescribeFlavor ¶ added in v2.22.0
func DescribeFlavor(credentials *resources.OpenstackCredentials, authURL, region string, caBundle *x509.CertPool, flavorName string) (*provider.NodeCapacity, error)
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(ctx context.Context, authURL, region string, credentials *resources.OpenstackCredentials, caBundle *x509.CertPool) ([]ossecuritygroups.SecGroup, error)
GetSecurityGroups lists all available security groups for the given CloudSpec.DatacenterName.
func GetSubnetPools ¶ added in v2.21.0
func GetSubnetPools(ctx context.Context, authURL, region string, credentials *resources.OpenstackCredentials, ipVersion int, caBundle *x509.CertPool) ([]ossubnetpools.SubnetPool, error)
GetSubnetPools lists all available subnet pools.
func GetSubnets ¶
func GetSubnets(ctx context.Context, 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.
func ValidateCredentials ¶ added in v2.20.0
Types ¶
type NetworkWithExternalExt ¶
type NetworkWithExternalExt struct { osnetworks.Network osextnetwork.NetworkExternalExt }
NetworkWithExternalExt is a struct that implements all networks.
func GetNetworks ¶
func GetNetworks(ctx context.Context, 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) CleanUpCloudProvider ¶
func (os *Provider) CleanUpCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)
CleanUpCloudProvider does the clean-up in particular: removes security group and network configuration.
func (*Provider) ClusterNeedsReconciling ¶ added in v2.26.0
func (os *Provider) ClusterNeedsReconciling(cluster *kubermaticv1.Cluster) bool
func (*Provider) DefaultCloudSpec ¶
func (os *Provider) DefaultCloudSpec(ctx context.Context, spec *kubermaticv1.ClusterSpec) error
DefaultCloudSpec adds defaults to the cloud spec.
func (*Provider) InitializeCloudProvider ¶
func (os *Provider) InitializeCloudProvider(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)
InitializeCloudProvider initializes a cluster, in particular creates security group and network configuration.
func (*Provider) ReconcileCluster ¶ added in v2.26.0
func (os *Provider) ReconcileCluster(ctx context.Context, cluster *kubermaticv1.Cluster, update provider.ClusterUpdater) (*kubermaticv1.Cluster, error)
ReconcileCluster reconcile the cluster resources reconcile network, security group, subnets, routers and attach routers to subnet.
func (*Provider) ValidateCloudSpec ¶
ValidateCloudSpec validates the given CloudSpec.
func (*Provider) ValidateCloudSpecUpdate ¶
func (os *Provider) ValidateCloudSpecUpdate(_ context.Context, oldSpec kubermaticv1.CloudSpec, newSpec kubermaticv1.CloudSpec) error
ValidateCloudSpecUpdate verifies whether an update of cloud spec is valid and permitted.