frameworks

package
v0.0.0-...-cc8e7a3 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFIPNotFound = errors.New("FloatingIP not found")

ErrFIPNotFound is raised if the FIP cannot be found.

Functions

func IsFIPNotFound

func IsFIPNotFound(err error) bool

IsFIPNotFound checks whether the given error is an instance of ErrFIPNotFound.

Types

type K8sFramework

type K8sFramework struct {
	*kubernetes.Clientset
	// contains filtered or unexported fields
}

K8sFramework ..

func NewK8sFramework

func NewK8sFramework(options config.Options, logger log.Logger) (*K8sFramework, error)

NewK8sFramework returns a new K8sFramework or an error.

func (*K8sFramework) AddEventHandlerFuncsToNodeInformer

func (k8s *K8sFramework) AddEventHandlerFuncsToNodeInformer(addFunc, deleteFunc func(obj interface{}), updateFunc func(oldObj, newObj interface{}))

AddEventHandlerFuncsToNodeInformer adds EventHandlerFuncs to the node informer.

func (*K8sFramework) AddLabelsToNode

func (k8s *K8sFramework) AddLabelsToNode(ctx context.Context, node *corev1.Node, labels map[string]string) error

AddLabelsToNode adds a set of labels to a node and waits until the operation is done or times out.

func (*K8sFramework) GetNode

func (k8s *K8sFramework) GetNode(ctx context.Context, name string) (*corev1.Node, error)

GetNode gets a node by name and returns it or an error.

func (*K8sFramework) GetNodeFromIndexerByKey

func (k8s *K8sFramework) GetNodeFromIndexerByKey(key string) (*corev1.Node, bool, error)

GetNodeFromIndexerByKey returns a node by key from the informers indexer.

func (*K8sFramework) GetNodeInformerStore

func (k8s *K8sFramework) GetNodeInformerStore() cache.Store

GetNodeInformerStore returns the Store of the node informer.

func (*K8sFramework) Run

func (k8s *K8sFramework) Run(stopCh <-chan struct{})

Run starts the frameworks informers.

func (*K8sFramework) WaitForCacheToSync

func (k8s *K8sFramework) WaitForCacheToSync(stopCh <-chan struct{}) bool

WaitForCacheToSync waits until all informer caches have been synced.

type OSFramework

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

OSFramework is the OpenStack Framework.

func NewOSFramework

func NewOSFramework(opts config.Options, logger log.Logger) (*OSFramework, error)

NewOSFramework returns a new OSFramework.

func (*OSFramework) EnsureAssociatedInstanceAndFIP

func (o *OSFramework) EnsureAssociatedInstanceAndFIP(server *servers.Server, fip *neutronfip.FloatingIP) error

EnsureAssociatedInstanceAndFIP ensures the given floating IP is associated withe the given server.

func (*OSFramework) GetNetworkIDByName

func (o *OSFramework) GetNetworkIDByName(name string) (string, error)

GetNetworkIDByName returns a the id of the network found by name or an error.

func (*OSFramework) GetOrCreateFloatingIP

func (o *OSFramework) GetOrCreateFloatingIP(floatingIP, floatingNetworkID, subnetID, projectID, nodepool string, reuse bool) (*neutronfip.FloatingIP, error)

GetOrCreateFloatingIP gets and existing or create a new neutron floating IP and returns it or an error.

func (*OSFramework) GetServerByID

func (o *OSFramework) GetServerByID(id string) (*servers.Server, error)

GetServerByID returns the server or an error.

func (*OSFramework) GetServerByName

func (o *OSFramework) GetServerByName(name string) (*servers.Server, error)

GetServerByName returns an openstack server found by name or an error.

func (*OSFramework) GetSubnetIDByName

func (o *OSFramework) GetSubnetIDByName(name string) (string, error)

GetSubnetIDByName returns the subnet's id for the given name or an error.

Jump to

Keyboard shortcuts

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