Documentation ¶
Index ¶
- Constants
- type Reconciler
- func (r *Reconciler) CheckIfDeploymentIsPresent(ctx context.Context, depName string, sliceName, sliceGwName string) bool
- func (r *Reconciler) CheckRouteInSliceRouter(ctx context.Context, sliceGw *kubeslicev1beta1.SliceGateway, gwNsmIP string) (bool, error)
- func (r *Reconciler) CreateNewDeployment(ctx context.Context, depName string, sliceName, sliceGwName string) (ctrl.Result, error, bool)
- func (r *Reconciler) GetNsmIPForNewDeployment(ctx context.Context, sliceGw *kubeslicev1beta1.SliceGateway, depName string) (string, error)
- func (a *Reconciler) InjectClient(c client.Client) error
- func (r *Reconciler) MarkGwRouteForDeletion(ctx context.Context, sliceGw *kubeslicev1beta1.SliceGateway, depName string) error
- func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *Reconciler) TriggerGwDeploymentDeletion(ctx context.Context, sliceName, sliceGwName, depName, newDepName string) error
- type Request
- type Response
- type WorkerGWSidecarClientProvider
- type WorkerRouterClientProvider
Constants ¶
const ( ST_init string = "init" ST_new_deployment_created string = "new_deployment_created_state" ST_slicerouter_updated string = "slicerouter_updated_state" ST_old_deployment_deleted string = "old_deployment_deleted_state" ST_error string = "error_state" ST_end string = "end" )
FSM State names
const ( EV_verify_new_deployment_created string = "verify_new_deployment_created" EV_update_routing_table string = "update_routing_table" EV_delete_old_gw_deployment string = "delete_old_gw_deployment" EV_on_error string = "on_error" EV_end string = "end" )
FSM Event names
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reconciler ¶
type Reconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme MeshClient client.Client WorkerGWSidecarClient WorkerGWSidecarClientProvider WorkerRouterClient WorkerRouterClientProvider EventRecorder *events.EventRecorder FSM map[string]*fsm.FSM }
func (*Reconciler) CheckIfDeploymentIsPresent ¶ added in v1.1.5
func (*Reconciler) CheckRouteInSliceRouter ¶ added in v1.1.5
func (r *Reconciler) CheckRouteInSliceRouter(ctx context.Context, sliceGw *kubeslicev1beta1.SliceGateway, gwNsmIP string) (bool, error)
func (*Reconciler) CreateNewDeployment ¶ added in v1.1.5
func (*Reconciler) GetNsmIPForNewDeployment ¶ added in v1.1.5
func (r *Reconciler) GetNsmIPForNewDeployment(ctx context.Context, sliceGw *kubeslicev1beta1.SliceGateway, depName string) (string, error)
func (*Reconciler) InjectClient ¶
func (a *Reconciler) InjectClient(c client.Client) error
func (*Reconciler) MarkGwRouteForDeletion ¶ added in v1.1.5
func (r *Reconciler) MarkGwRouteForDeletion(ctx context.Context, sliceGw *kubeslicev1beta1.SliceGateway, depName string) error
func (*Reconciler) Reconcile ¶
The basic principles of the workerslicegatewayrecycler are as follows:
The server instance is the orchestrator of the recycling process. It is the owner of the FSM. The FSM maintains the status of the recycling process. Only the server instance should update the states. It can send requests to the client instance using the Request field in the Spec secion of the CR. The progression of the FSM depends on the responses received from the client instance.
The client instance is driven by the requests posted by the server instance. The client instance performs the needed operations to fulfill the requests. On completion of a request, it should post an appropriate response.
The workerslicegatewayrecycler reconciler is an external orchestrator of the recycling process. It should not create or delete slice gateway services or deployments. It can only request such actions from the slicegateway reconciler. It should only read the state of the slicegateways and slicerouters to deduce the next actions to be taken to progress the recycling process.
The FSM should not be re-initialized if the operator restarts. The server instance must pick up from where it had left.
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up reconciler with manager
func (*Reconciler) TriggerGwDeploymentDeletion ¶ added in v1.1.5
func (r *Reconciler) TriggerGwDeploymentDeletion(ctx context.Context, sliceName, sliceGwName, depName, newDepName string) error
type Response ¶ added in v1.1.5
type Response int
Operation Response names The names must be in the order of forward progression of the FSM.
type WorkerRouterClientProvider ¶
type WorkerRouterClientProvider interface { UpdateEcmpRoutes(ctx context.Context, serverAddr string, ecmpUpdateInfo *router.UpdateEcmpInfo) error GetRouteInKernel(ctx context.Context, serverAddr string, sliceRouterConnCtx *router.GetRouteConfig) (*sidecar.VerifyRouteAddResponse, error) }