Versions Compared

Key

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

...

Drawio
bordertrue
viewerToolbartrue
fitWindowfalse
diagramDisplayName
lboxtrue
revision1517
diagramNameDCM
simpleViewerfalse
width1000
linksauto
tbstyletop
diagramWidth721

...

Code Block
languagepy
func createNamespace(logicalCloudName Namespace string)  error  //Stores the namespace for the logical cloud in the database

func createUser(user logicalCloudName string permissions []map[string]map[string][]string) error //Stores the user details for the logical cloud in the database

func createKVpair(name description string userData map[string]string kvPair []map[string]string) error  //Stores a new key value pair in the database

func addCluster(cluster logicalCloudName string) error //Associates a new cluster with the logical cloud

func addUserPermissions(user permissionName string apiGroups resources verbs []string) error

func applyConfig(logicalCloudName string) error //Talks to the Resource Synchronizer to start the actual creation of all the resources for the logical cloud

func getKVPair(name string) ([]map[string]string error)

func getClusterConfig(cluster logicalCloudName string) ([]byte, error) //Returns Kubeconfig for the cluster in JSON format

func getNamespace(logicalCloudName string) (string error)

func getUser(logicalCloudName string) (string error)

func getClusters(logicalCloudName string) ([]string error)

func getUserPermissions(user string) (([]map[string]map[string][]string)  error) //Sample output [{"permission-1": {"apiGroups": ["stable.example.com"], "resources" : ["secrets", "pods"], "verbs" : ["get", "watch", "list", "create"] }}, 
                                                                                              {"permission-2": {"apiGroups": [""], "resources" : ["configmaps"], "verbs" : ["*"] }}]



Service Mesh API

Code Block
languagevb
titleService Mesh API

func create_mesh () {func create_mesh_namespace(logical-cloud-name)func get_ca_certs(url)func install_helm() (or install istioctl)}

func create_mesh_namespace(logical-cloud-name, resource_synch) {
   
}


REST API

1.  Create Logical Cloud

...

Code Block
languagejs
titleAssociate logical cloud with cluster
URL: /v2/projects/<project-name>/logical-clouds/<logical-cloud-name>/cluster-references/
POST BODY:
{

 "cluster-reference": "cluster-name", //name of the cluster
 "loadbalancer-ip" : "0.0.0.0"  //IP address of the istio loadbalancer for the logical cloud control plane in the cluster

 
}
Return Status: 200 (OK)
Return Body:
{
  "name" : "cluster-reference-1",
  "cluster-name" : "cluster-1"
}

...