Documentation
¶
Index ¶
- Variables
- func IsFIPNotFound(err error) bool
- type K8sFramework
- func (k8s *K8sFramework) AddEventHandlerFuncsToNodeInformer(addFunc, deleteFunc func(obj interface{}), ...)
- func (k8s *K8sFramework) AddLabelsToNode(ctx context.Context, node *corev1.Node, labels map[string]string) error
- func (k8s *K8sFramework) GetNode(ctx context.Context, name string) (*corev1.Node, error)
- func (k8s *K8sFramework) GetNodeFromIndexerByKey(key string) (*corev1.Node, bool, error)
- func (k8s *K8sFramework) GetNodeInformerStore() cache.Store
- func (k8s *K8sFramework) Run(stopCh <-chan struct{})
- func (k8s *K8sFramework) WaitForCacheToSync(stopCh <-chan struct{}) bool
- type OSFramework
- func (o *OSFramework) EnsureAssociatedInstanceAndFIP(server *servers.Server, fip *neutronfip.FloatingIP) error
- func (o *OSFramework) GetNetworkIDByName(name string) (string, error)
- func (o *OSFramework) GetOrCreateFloatingIP(floatingIP, floatingNetworkID, subnetID, projectID, nodepool string, ...) (*neutronfip.FloatingIP, error)
- func (o *OSFramework) GetServerByID(id string) (*servers.Server, error)
- func (o *OSFramework) GetServerByName(name string) (*servers.Server, error)
- func (o *OSFramework) GetSubnetIDByName(name string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var ErrFIPNotFound = errors.New("FloatingIP not found")
ErrFIPNotFound is raised if the FIP cannot be found.
Functions ¶
func IsFIPNotFound ¶
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 ¶
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) GetNodeFromIndexerByKey ¶
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 ¶
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.