Documentation ¶
Index ¶
- func GetRouteCRCondition(status *vpcapisv1.StaticRouteStatus, conditionType vpcapisv1.ConditionType) *vpcapisv1.StaticRouteCondition
- type RouteManager
- func (sr *RouteManager) CreateCPRoutes(staticroutes helper.RouteCRList) ([]*cloudprovider.Route, error)
- func (sr *RouteManager) CreateRouteCR(ctx context.Context, routeInfo *helper.RouteInfo) (helper.RouteCR, error)
- func (sr *RouteManager) DeleteRouteCR(nodeName string) error
- func (sr *RouteManager) GetClients() nsxclients.Interface
- func (sr *RouteManager) ListRouteCR(ctx context.Context, ls metav1.LabelSelector) (helper.RouteCRList, error)
- func (sr *RouteManager) WaitRouteCR(name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRouteCRCondition ¶
func GetRouteCRCondition(status *vpcapisv1.StaticRouteStatus, conditionType vpcapisv1.ConditionType) *vpcapisv1.StaticRouteCondition
GetRouteCRCondition extracts the provided condition from the given StaticRouteStatus and returns that. Returns nil if the condition is not present.
Types ¶
type RouteManager ¶
type RouteManager struct {
// contains filtered or unexported fields
}
RouteManager defines a route manager working with static route CR
func NewRouteManager ¶
func NewRouteManager(config *rest.Config, clusterNS string) (*RouteManager, error)
NewRouteManager initializes a RouteManager
func NewRouteManagerWithClients ¶
func NewRouteManagerWithClients(clients nsxclients.Interface, clusterNS string) (*RouteManager, error)
NewRouteManagerWithClients initializes a RouteManager with clientset
func (*RouteManager) CreateCPRoutes ¶
func (sr *RouteManager) CreateCPRoutes(staticroutes helper.RouteCRList) ([]*cloudprovider.Route, error)
CreateCPRoutes creates cloudprovider Routes based on Route CR
func (*RouteManager) CreateRouteCR ¶
func (sr *RouteManager) CreateRouteCR(ctx context.Context, routeInfo *helper.RouteInfo) (helper.RouteCR, error)
CreateRouteCR creates the RouteManager CR
func (*RouteManager) DeleteRouteCR ¶
func (sr *RouteManager) DeleteRouteCR(nodeName string) error
DeleteRouteCR deletes corresponding RouteSet CR when there is a node deleted
func (*RouteManager) GetClients ¶
func (sr *RouteManager) GetClients() nsxclients.Interface
GetClients get clientsets. It's used in unit tests
func (*RouteManager) ListRouteCR ¶
func (sr *RouteManager) ListRouteCR(ctx context.Context, ls metav1.LabelSelector) (helper.RouteCRList, error)
ListRouteCR lists Route CRs belongd to the namespace and the labelselector
func (*RouteManager) WaitRouteCR ¶
func (sr *RouteManager) WaitRouteCR(name string) error
WaitRouteCR validates if route CR condition is Ready