...
Code Block | ||||
---|---|---|---|---|
| ||||
URL: /v2/projects/<project-name>/logical-clouds/<name><logical-cloud-name> PUT BODY: { "metadata" : { "name": "lc-1", "description": "logical cloud for walmart finance department", //description for the logical cloud "userData1":"<user data>", "userData2":"<user data>" }, "spec" : { "namespace" : "ns-1", // one namespace per logical cloud "user" : { "user-name" : "user-1", //name of user for this cloud (username and logical cloud name would be used as subject for the user key) "type" : "certificate", //type of authentication credentials used by user (certificate, Token, UNPW) "user-permissions" : [ { "permission-name" : "permission-1", "apiGroups" : ["stable.example.com"], "resources" : ["secrets", "pods"], "verbs" : ["get", "watch", "list", "create"] }, { "permission-name" : "permission-2", "apiGroups" : [""], "resources" : ["configmaps"], "verbs" : ["*"] } ] } } } Return Status: 200 (OK) Return Body: { "name" : "logical-cloud-1", "logical-cloud-name" : "logical-cloud-1", "namespace" : "ns-1", "user" : "user-1" } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
GET URL: /v2/projects/<project-name>/logical-clouds/<name><logical-cloud-name> RESPONSE BODY: { "metadata" : { "name": "lc-1", //unique name for the record "description": "logical cloud for walmart finance department", //description for the logical cloud "userData1":"<user data>", "userData2":"<user data>" }, "spec" : { "namespace" : "ns-1", // one namespace per logical cloud "user" : { "user-name" : "user-1", //name of user for this cloud (username and logical cloud name would be used as subject for the user key) "type" : "certificate", //type of authentication credentials used by user (certificate, Token, UNPW) "user-permissions" : [ { "permission-name" : "permission-1", "apiGroups" : ["stable.example.com"], "resources" : ["secrets", "pods"], "verbs" : ["get", "watch", "list", "create"] }, { "permission-name" : "permission-2", "apiGroups" : [""], "resources" : ["configmaps"], "verbs" : ["*"] } ], "clusters" : ["cluster-1", "cluster-2", "cluster-3] } } } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
DELETE URL: /v2/projects/<project-name>/logical-clouds/<name><logical-cloud-name> |
Logical Cloud Cluster API
...
Code Block | ||||
---|---|---|---|---|
| ||||
URL: /v2/projects/<project-name>/logical-clouds/<logical-cloud-name>/cluster-provider/<cluster-provider-name>/cluster-references/ POST BODY: { references/ POST BODY: { "metadata" : { "name": "lc-cl-1", "description": "desc", "userData1":"<user data>", "userData2":"<user data>" }, "spec" : { "cluster-provider": "cp-1", "cluster-name": "c1", //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: { "cluster-name" : "cluster-1" "loadbalancer-ip" : "0.0.0.0" } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
URL: /v2/projects/<project-name>/logical-clouds/<logical-cloud-name>/cluster-providers/<cluster-provider-name>/cluster-references/cluster-name
PUT BODY:
{
"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:
{
"cluster-name" : "cluster-1"
"loadbalancer-ip" : "0.0.0.0"
} |
...
Code Block | ||||
---|---|---|---|---|
| ||||
GET URL: /v2/projects/<project-name>/logical-clouds/<logical-cloud-name>/cluster-providers/<cluster-provider-name>/cluster-references/ RESPONSE BODY: { cluster-references : [ { "cluster-name" : "c1", "loadbalancer-ip" : "0.0.0.0 }, { "cluster-name" : "c2", "loadbalancer-ip" : "x.x.x.x } ] } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
DELETE
URL: /v2/projects/<project-name>/logical-clouds/<logical-cloud-name>/cluster-providers/<cluster-provider-name>/cluster-references/<cluster-name>
RESPONSE STATUS: 204
}
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
URL: /v2/projects/<project-name>/logical-clouds/<logical-cloud-name>/kv-pairs/<name><kv-pair-name> PUT BODY { "metadata":{ "description":"<description>", "userData1":"<user data>", "userData2":"<user data>" }, "spec":{ "kv":[ { "key1":"val3" }, { "key2":"val4" } ] } } RETURN STATUS: 201 RETURN BODY: { "metadata":{ "description":"<description>", "userData1":"<user data>", "userData2":"<user data>" }, "spec":{ "kv":[ { "key1":"val3" }, { "key2":"val4" } ] } } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
URL: /v2/projects/<project-name>/logical-clouds/<logical-cloud-name>/kv-pairs/<name><kv-pair-name> RETURN STATUS: 200 RETURN BODY: { "metadata":{ "name":"<name>", "description":"<description>", "userData1":"<user data>", "userData2":"<user data>" }, "spec":{ "kv":[ { "key1":"val1" }, { "key2":"val2" } ] } } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
URL: /v2/projects/<project-name>/logical-clouds/<logical-cloud-name>/kv-pairs/<name><kv-pair-name> RETURN STATUS: 204 |
Kubeconfig API (WORK IN PROGRESS)
...