Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Project Module:  Projects allow multi-tenancy in the application from a user perspective.

Definition Composi Module:  K8splugin artifacts start in the form of Definitions representing an application. These are nothing but Helm Charts wrapped with some metadata about the application itself.  The Definition is a tar file. If an application is made up of multiple applications then Definition will be made up multiple Helm charts representing each sub-application. The orchestrator decides the placement of each sub-application and their associated Kubernetes resources after considering inputs from the placement controllers like the HPA controller.

Profile Module: Once the Definitions are created, we are ready to create some profiles so that we can customize that definition and instantiate it in Kubernetes. Profile names are unique within a definition and version.

Day 2 Config Module:  Day 2 Configurations for applications are applied using K8S kinds (typically CRDs) implemented by application-specific operators.   

Intent Group Module: Intent Group API is used to create Intent Groups that can then will be used at instantiation time. Some intents that can be part of an Intent Group are Generic Placement Intent, HPA Intent, and traffic controller Intent.

...

Cluster Registration Module:  Registering a cluster with cluster-specific information to be used by the Resource sync module

Day 2 Config Module:  Day 2 Configurations for applications are applied using K8S kinds (typically CRDs) implemented by application-specific operators.   

Resource sync micro-service components:

...

  1. Get the clusters that form the logical cloud to schedule the application. Validate the application, intent group, and generic placement intent.
  2. Create etcd Context for the application
  3. Process the Generic placement context and populate the etcd context with the edge list.
  4. Generate Kubernetes resources from the Helm charts by using Helm templating and from macros. Copy resources in etcd store based on the context for the application.
  5. Placement stage: Call all the placement controllers including the HPA  controller in order. Wait for one controller to complete before going to the next controller.
    1. HPA controller: Kubernetes resource manipulation. Add additional information to the deployments. In the case where the generic intent calls for anyof clusters, the HPA controller can make a selection for one or more clusters meeting the HPA requirements for the sub-application.
  6. Action Controller Stage:  Call all the action controllers including Traffic Controller in order. Wait for one controller to complete before going to the next controller.
    1. Traffic Controller: Creates more resources for traffic routing and management between clusters.
  7. After all the controllers are done processing if there are still multiple clusters that meet the requirements, the orchestrator will pick up the first cluster to schedule the resource.
  8. Diff the original application resources and the edges that they are created on with this application context. Generate a list of resources to be changed.
  9. Send notification to the resource sync to create/update/delete the resources on the selected clusters. Once the resources are scheduled to be updated the resource scheduler sends back notification to the orchestrator which in turn returns HTTP response as a success for the instantiation API.
  10.  Resource Sync will periodically check the status of the resources and update the database with the status of the resource.


Orchestrator High-Level Design


draw.io Diagram
bordertrue
diagramNameHLD K8s Orchestrator
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth1441
revision3

Infrastructure Library

  • MongoDB - Create, Read, Write
  • Etcd - Create, Read, Write

Module Access Library

Project API- CreateProject, DeleteProject, GetProject

Composite App API - CreateCompositeApp, GetCompositeApp, DeleteCompositeApp, AddApptoCompositeApp,DeleteAppFromCompositeApp,....

Composite Profile API - ....

Generic Placement API - CreateGenericPlacement, DeleteGenericPlacement, GetGenericPlacement, AddIntent, DeleteIntent, GetIntent

Deployment Intent API - 

Status API - 

Runtime Resource Context Library

CreateContext(project, name) returns contextId

AddApp(contextId, name) return error

AddCluster(contextId, app-name, cluster-name)

AddResource(contextId, app-name, cluster-name, resourceName)

RESTful North API (with examples)

...