| URI | GET | POST | PUT | PATCH | DELETE |
|---|---|---|---|---|---|
| /cluster | List | Create | |||
| /cluster/["platform"] | List | Create | Upgrade | Rollback | Destroy |
| /addons | List | Install | Destroy | ||
| /addons/["name"]/ | List | Update | Destroy | ||
| /addons/["name"]/["actions"] | List | Use |
All endpoints should be defined and should have HATEOAS in the resultset. Every CMD and Entity should have a endpoint.
List the avaible and supported platforms with ref links and versions
[
{
"name": "aws",
"version": "0.0.1",
"refs": [
{
"action":"create",
"method":"POST",
"url": "/cluster/aws"
},
{
"action":"install",
"method":"PUT",
"url": "/cluster/aws"
},
{
"action":"destroy",
"method":"DELETE",
"url": "/cluster/aws"
},
]
},
// ...
]As Request it could be a option to send some configs needed for the init But the question is if this part needed, because the rest api is not avaible without init tk8. But for multi plattform solution it is needed
{
// config fileds for the init
}{
"status": "sucess|failed",
"message": ""
}Return the status of this cluster
{
"status": "sucess|failed|initialized",
"message": ""
}Create the platform
{
// config fileds for the platform
}{
"status": "sucess|failed",
"message": ""
}Install or Upgrade the platform
{
// config fileds for the platform
}{
"status": "sucess|failed",
"message": ""
}could be used for a roolback
{
// config fileds for the platform
}{
"status": "sucess|failed",
"message": ""
}destroy the platform
{
"status": "sucess|failed",
"message": ""
}Private and public clouds which are supported
- aws
- azure
- gcp
- baremetal
- openstack
or for later use
- federation
Different actions to interact with for example to scale a pod, create some pod or destroy a pod
the name of a specifical addon
some addons could have some extra actions so it can managed here
|URI|GET|POST|PUT|PATCH|DELETE| |/cluster/["platform"]/{namespace}|List|Create|Upgrade||Destroy| |/cluster/["platform"]/{namespace}/pods|List|Create|Upgrade||Destroy| |/cluster/["platform"]/{namespace}/pods/{name}|List|Create|Upgrade||Destroy| |/cluster/["platform"]/{namespace}/pods/{name}/["actions"]|List|Create|Upgrade|Rollback|Destroy| |/cluster/["platform"]/{namespace}/services|List|Create|Upgrade||Destroy| |/cluster/["platform"]/{namespace}/services/{name}|List|Create|Upgrade||Destroy| |/cluster/["platform"]/{namespace}/services/{name}/["actions"]|List|Create|Upgrade|Rollback|Destroy| |/cluster/["platform"]/{namespace}/nodes|List|Create|Upgrade||Destroy| |/cluster/["platform"]/{namespace}/nodes/{id}|List|Configure|Upgrade||Destroy| |/cluster/["platform"]/{namespace}/configs|List|Create|Upgrade||Destroy|
As we just support the following commands:
& we doesn't directly manage k8s cluster resource, therefore, I think we don't need
{namespace}/{nodes/pods/services}. But rather it should be/cluster/["platform"]/["actions"]. Rest/addons/["name"]/["actions"]is awesome.