Documentation ¶
Index ¶
- Variables
- func GetPortName(instanceName string, opts *infrav1.PortOpts, netIndex int) string
- func GetSGControlPlaneAdditionalPorts(ports []int) []infrav1.SecurityGroupRule
- func GetSGControlPlaneAllowAll(remoteGroupIDSelf, secWorkerGroupID string) []infrav1.SecurityGroupRule
- func GetSGControlPlaneGeneral(remoteGroupIDSelf, secWorkerGroupID string) []infrav1.SecurityGroupRule
- func GetSGControlPlaneHTTPS() []infrav1.SecurityGroupRule
- func GetSGControlPlaneSSH(secBastionGroupID string) []infrav1.SecurityGroupRule
- func GetSGWorkerAllowAll(remoteGroupIDSelf, secControlPlaneGroupID string) []infrav1.SecurityGroupRule
- func GetSGWorkerGeneral(remoteGroupIDSelf, secControlPlaneGroupID string) []infrav1.SecurityGroupRule
- func GetSGWorkerNodePort() []infrav1.SecurityGroupRule
- func GetSGWorkerSSH(secBastionGroupID string) []infrav1.SecurityGroupRule
- type Service
- func (s *Service) AssociateFloatingIP(eventObject runtime.Object, fp *floatingips.FloatingIP, portID string) error
- func (s *Service) DeleteBastionSecurityGroup(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) DeleteFloatingIP(eventObject runtime.Object, ip string) error
- func (s *Service) DeleteNetwork(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) DeletePort(eventObject runtime.Object, portID string) error
- func (s *Service) DeletePorts(openStackCluster *infrav1.OpenStackCluster) error
- func (s *Service) DeleteRouter(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) DeleteSecurityGroups(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) DeleteTrunk(eventObject runtime.Object, portID string) error
- func (s *Service) DisassociateFloatingIP(eventObject runtime.Object, ip string) error
- func (s *Service) GarbageCollectErrorInstancesPort(eventObject runtime.Object, instanceName string, portOpts []infrav1.PortOpts) error
- func (s *Service) GetFloatingIP(ip string) (*floatingips.FloatingIP, error)
- func (s *Service) GetFloatingIPByPortID(portID string) (*floatingips.FloatingIP, error)
- func (s *Service) GetNetworkIDsByFilter(opts networks.ListOptsBuilder) ([]string, error)
- func (s *Service) GetNetworkSubnetByFilter(networkID string, filter *infrav1.SubnetFilter) (*subnets.Subnet, error)
- func (s *Service) GetNetworksByFilter(opts networks.ListOptsBuilder) ([]networks.Network, error)
- func (s *Service) GetOrCreateFloatingIP(eventObject runtime.Object, openStackCluster *infrav1.OpenStackCluster, ...) (*floatingips.FloatingIP, error)
- func (s *Service) GetOrCreatePort(eventObject runtime.Object, clusterName string, portName string, ...) (*ports.Port, error)
- func (s *Service) GetPortFromInstanceIP(instanceID string, ip string) ([]ports.Port, error)
- func (s *Service) GetSecurityGroups(securityGroupParams []infrav1.SecurityGroupFilter) ([]string, error)
- func (s *Service) GetSubnetByFilter(filter *infrav1.SubnetFilter) (*subnets.Subnet, error)
- func (s *Service) GetSubnetsByFilter(opts subnets.ListOptsBuilder) ([]subnets.Subnet, error)
- func (s *Service) GetTrunkSupport() (bool, error)
- func (s *Service) ReconcileExternalNetwork(openStackCluster *infrav1.OpenStackCluster) error
- func (s *Service) ReconcileNetwork(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) ReconcileRouter(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) ReconcileSecurityGroups(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) ReconcileSubnet(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrFilterMatch = fmt.Errorf("filter match error") ErrMultipleMatches = multipleMatchesError{} ErrNoMatches = noMatchesError{} )
Functions ¶
func GetPortName ¶ added in v0.8.0
GetPortName appends a suffix to an instance name in order to try and get a unique name per port.
func GetSGControlPlaneAdditionalPorts ¶ added in v0.8.0
func GetSGControlPlaneAdditionalPorts(ports []int) []infrav1.SecurityGroupRule
Permit ports that defined in openStackCluster.Spec.APIServerLoadBalancer.AdditionalPorts.
func GetSGControlPlaneAllowAll ¶ added in v0.7.0
func GetSGControlPlaneAllowAll(remoteGroupIDSelf, secWorkerGroupID string) []infrav1.SecurityGroupRule
Permit all ingress from the cluster security groups.
func GetSGControlPlaneGeneral ¶ added in v0.7.0
func GetSGControlPlaneGeneral(remoteGroupIDSelf, secWorkerGroupID string) []infrav1.SecurityGroupRule
func GetSGControlPlaneHTTPS ¶ added in v0.7.0
func GetSGControlPlaneHTTPS() []infrav1.SecurityGroupRule
Allow all traffic, including from outside the cluster, to access the API.
func GetSGControlPlaneSSH ¶ added in v0.7.0
func GetSGControlPlaneSSH(secBastionGroupID string) []infrav1.SecurityGroupRule
Permit traffic for ssh control plane.
func GetSGWorkerAllowAll ¶ added in v0.7.0
func GetSGWorkerAllowAll(remoteGroupIDSelf, secControlPlaneGroupID string) []infrav1.SecurityGroupRule
Permit all ingress from the cluster security groups.
func GetSGWorkerGeneral ¶ added in v0.7.0
func GetSGWorkerGeneral(remoteGroupIDSelf, secControlPlaneGroupID string) []infrav1.SecurityGroupRule
func GetSGWorkerNodePort ¶ added in v0.7.0
func GetSGWorkerNodePort() []infrav1.SecurityGroupRule
Allow all traffic, including from outside the cluster, to access node port services.
func GetSGWorkerSSH ¶ added in v0.7.0
func GetSGWorkerSSH(secBastionGroupID string) []infrav1.SecurityGroupRule
Permit traffic for ssh worker.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service interfaces with the OpenStack Networking API. It will create a network related infrastructure for the cluster, like network, subnet, router, security groups.
func NewService ¶
NewService returns an instance of the networking service.
func (*Service) AssociateFloatingIP ¶ added in v0.3.4
func (s *Service) AssociateFloatingIP(eventObject runtime.Object, fp *floatingips.FloatingIP, portID string) error
func (*Service) DeleteBastionSecurityGroup ¶ added in v0.3.5
func (s *Service) DeleteBastionSecurityGroup(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) DeleteFloatingIP ¶ added in v0.3.3
func (*Service) DeleteNetwork ¶ added in v0.3.1
func (s *Service) DeleteNetwork(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) DeletePort ¶ added in v0.5.0
func (*Service) DeletePorts ¶ added in v0.7.0
func (s *Service) DeletePorts(openStackCluster *infrav1.OpenStackCluster) error
func (*Service) DeleteRouter ¶ added in v0.3.1
func (s *Service) DeleteRouter(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) DeleteSecurityGroups ¶
func (s *Service) DeleteSecurityGroups(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) DeleteTrunk ¶ added in v0.5.0
func (*Service) DisassociateFloatingIP ¶ added in v0.3.5
func (*Service) GarbageCollectErrorInstancesPort ¶ added in v0.5.0
func (*Service) GetFloatingIP ¶ added in v0.6.0
func (s *Service) GetFloatingIP(ip string) (*floatingips.FloatingIP, error)
func (*Service) GetFloatingIPByPortID ¶ added in v0.3.5
func (s *Service) GetFloatingIPByPortID(portID string) (*floatingips.FloatingIP, error)
func (*Service) GetNetworkIDsByFilter ¶ added in v0.3.5
func (s *Service) GetNetworkIDsByFilter(opts networks.ListOptsBuilder) ([]string, error)
GetNetworkIDsByFilter retrieves network ids by querying openstack with filters.
func (*Service) GetNetworkSubnetByFilter ¶ added in v0.7.3
func (s *Service) GetNetworkSubnetByFilter(networkID string, filter *infrav1.SubnetFilter) (*subnets.Subnet, error)
GetNetworkSubnetByFilter gets a single subnet of the given network, specified by the given SubnetFilter. It returns an ErrFilterMatch if no or multiple subnets are found.
func (*Service) GetNetworksByFilter ¶
GetNetworksByFilter retrieves networks by querying openstack with filters.
func (*Service) GetOrCreateFloatingIP ¶ added in v0.3.2
func (s *Service) GetOrCreateFloatingIP(eventObject runtime.Object, openStackCluster *infrav1.OpenStackCluster, clusterName, ip string) (*floatingips.FloatingIP, error)
func (*Service) GetOrCreatePort ¶ added in v0.5.0
func (*Service) GetPortFromInstanceIP ¶ added in v0.5.0
GetPortFromInstanceIP returns at most one port attached to the instance with given ID and with the IP address provided.
func (*Service) GetSecurityGroups ¶ added in v0.5.0
func (s *Service) GetSecurityGroups(securityGroupParams []infrav1.SecurityGroupFilter) ([]string, error)
func (*Service) GetSubnetByFilter ¶ added in v0.7.2
GetSubnetByFilter gets a single subnet specified by the given SubnetFilter. It returns an ErrFilterMatch if no or multiple subnets are found.
func (*Service) GetSubnetsByFilter ¶
GetSubnetsByFilter gets the id of a subnet by querying openstack with filters.
func (*Service) GetTrunkSupport ¶ added in v0.5.0
func (*Service) ReconcileExternalNetwork ¶ added in v0.3.2
func (s *Service) ReconcileExternalNetwork(openStackCluster *infrav1.OpenStackCluster) error
func (*Service) ReconcileNetwork ¶
func (s *Service) ReconcileNetwork(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) ReconcileRouter ¶
func (s *Service) ReconcileRouter(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) ReconcileSecurityGroups ¶
func (s *Service) ReconcileSecurityGroups(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
ReconcileSecurityGroups reconcile the security groups.
func (*Service) ReconcileSubnet ¶
func (s *Service) ReconcileSubnet(openStackCluster *infrav1.OpenStackCluster, clusterName string) error