networking

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSGControlPlaneAllowAll

func GetSGControlPlaneAllowAll(remoteGroupIDSelf, secWorkerGroupID string) []infrav1.SecurityGroupRule

Permit all ingress from the cluster security groups.

func GetSGControlPlaneGeneral

func GetSGControlPlaneGeneral(remoteGroupIDSelf, secWorkerGroupID string) []infrav1.SecurityGroupRule

func GetSGControlPlaneHTTPS

func GetSGControlPlaneHTTPS() []infrav1.SecurityGroupRule

Allow all traffic, including from outside the cluster, to access the API.

func GetSGControlPlaneSSH

func GetSGControlPlaneSSH(secBastionGroupID string) []infrav1.SecurityGroupRule

Permit traffic for ssh control plane.

func GetSGWorkerAllowAll

func GetSGWorkerAllowAll(remoteGroupIDSelf, secControlPlaneGroupID string) []infrav1.SecurityGroupRule

Permit all ingress from the cluster security groups.

func GetSGWorkerGeneral

func GetSGWorkerGeneral(remoteGroupIDSelf, secControlPlaneGroupID string) []infrav1.SecurityGroupRule

func GetSGWorkerNodePort

func GetSGWorkerNodePort() []infrav1.SecurityGroupRule

Allow all traffic, including from outside the cluster, to access node port services.

func GetSGWorkerSSH

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

func NewService(scope *scope.Scope) (*Service, error)

NewService returns an instance of the networking service.

func NewTestService

func NewTestService(projectID string, client clients.NetworkClient, logger logr.Logger) *Service

NewTestService returns a Service with no initialisation. It should only be used by tests.

func (*Service) AssociateFloatingIP

func (s *Service) AssociateFloatingIP(eventObject runtime.Object, fp *floatingips.FloatingIP, portID string) error

func (*Service) CollectPortSecurityGroups

func (s *Service) CollectPortSecurityGroups(eventObject runtime.Object, portSecurityGroups *[]string, portSecurityGroupFilters []infrav1.SecurityGroupParam) (*[]string, error)

CollectPortSecurityGroups collects distinct securityGroups from port.SecurityGroups and port.SecurityGroupFilter fields.

func (*Service) DeleteBastionSecurityGroup

func (s *Service) DeleteBastionSecurityGroup(openStackCluster *infrav1.OpenStackCluster, clusterName string) error

func (*Service) DeleteFloatingIP

func (s *Service) DeleteFloatingIP(eventObject runtime.Object, ip string) error

func (*Service) DeleteNetwork

func (s *Service) DeleteNetwork(openStackCluster *infrav1.OpenStackCluster, clusterName string) error

func (*Service) DeletePort

func (s *Service) DeletePort(eventObject runtime.Object, portID string) error

func (*Service) DeletePorts

func (s *Service) DeletePorts(openStackCluster *infrav1.OpenStackCluster) error

func (*Service) DeleteRouter

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

func (s *Service) DeleteTrunk(eventObject runtime.Object, portID string) error

func (*Service) DisassociateFloatingIP

func (s *Service) DisassociateFloatingIP(eventObject runtime.Object, ip string) error

func (*Service) GarbageCollectErrorInstancesPort

func (s *Service) GarbageCollectErrorInstancesPort(eventObject runtime.Object, instanceName string) error

func (*Service) GetFloatingIP

func (s *Service) GetFloatingIP(ip string) (*floatingips.FloatingIP, error)

func (*Service) GetFloatingIPByPortID

func (s *Service) GetFloatingIPByPortID(portID string) (*floatingips.FloatingIP, error)

func (*Service) GetNetworkIDsByFilter

func (s *Service) GetNetworkIDsByFilter(opts networks.ListOptsBuilder) ([]string, error)

GetNetworkIDsByFilter retrieves network ids by querying openstack with filters.

func (*Service) GetNetworksByFilter

func (s *Service) GetNetworksByFilter(opts networks.ListOptsBuilder) ([]networks.Network, error)

GetNetworksByFilter retrieves networks by querying openstack with filters.

func (*Service) GetOrCreateFloatingIP

func (s *Service) GetOrCreateFloatingIP(eventObject runtime.Object, openStackCluster *infrav1.OpenStackCluster, clusterName, ip string) (*floatingips.FloatingIP, error)

func (*Service) GetOrCreatePort

func (s *Service) GetOrCreatePort(eventObject runtime.Object, clusterName string, portName string, net infrav1.Network, instanceSecurityGroups *[]string, instanceTags []string) (*ports.Port, error)

func (*Service) GetPortFromInstanceIP

func (s *Service) GetPortFromInstanceIP(instanceID string, ip string) ([]ports.Port, error)

GetPortFromInstanceIP returns at most one port attached to the instance with given ID and with the IP address provided.

func (*Service) GetSecurityGroups

func (s *Service) GetSecurityGroups(securityGroupParams []infrav1.SecurityGroupParam) ([]string, error)

func (*Service) GetSubnetsByFilter

func (s *Service) GetSubnetsByFilter(opts subnets.ListOptsBuilder) ([]subnets.Subnet, error)

GetSubnetsByFilter gets the id of a subnet by querying openstack with filters.

func (*Service) GetTrunkSupport

func (s *Service) GetTrunkSupport() (bool, error)

func (*Service) ReconcileExternalNetwork

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

Jump to

Keyboard shortcuts

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