Versions Compared

Key

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

...

Code Block
languagejs
titleLogical Cloud Creation API
URL: /v2/projects/<project-name>/logical-clouds
POST BODY:
{
 "metadata" : {
 	"logical-cloud-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" : ["*"]
       }
    ]
  }
 }
}

Return Status: 201
Return Body:
{
  "name" : "logical-cloud-1",
  "logical-cloud-name" : "logical-cloud-1",
  "namespace" : "ns-1",
  "user-name" : "user-1"
}

...

Code Block
languagejs
titlePUT Logical Cloud
URL: /v2/projects/<project-name>/logical-clouds/<logical-cloud-name>
PUT BODY:
{
 "metadata" : {
	"logical-cloud-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
languagejs
titleGET Logical Cloud
GET
URL: /v2/projects/<project-name>/logical-clouds/<logical-cloud-name>
RESPONSE BODY:
{
 "metadata" : {
 	"logical-cloud-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]
  }
 }
}
  

...