Create Cluster Template

Create Cluster Template

Api to create a cluster template for Telco Cloud Automation

Request
URI
POST
https://{api_host}/hybridity/api/infra/cluster-templates
COPY
Request Body
clusterTemplate of type(s) application/json
Required
{
    "clusterType": "MANAGEMENT",
    "clusterConfig": {
        "csi": [
            {
                "name": "vsphere-csi",
                "properties": {
                    "isDefault": true,
                    "name": "name",
                    "timeout": "timeout"
                }
            },
            {
                "name": "vsphere-csi",
                "properties": {
                    "isDefault": true,
                    "name": "name",
                    "timeout": "timeout"
                }
            }
        ],
        "tools": [
            {
                "name": "helm",
                "version": "version"
            },
            {
                "name": "helm",
                "version": "version"
            }
        ],
        "cni": [
            {
                "name": "calico",
                "properties": "{}"
            },
            {
                "name": "calico",
                "properties": "{}"
            }
        ],
        "kubernetesVersion": "kubernetesVersion"
    },
    "masterNodes": [
        {
            "cloneMode": "fullClone",
            "memory": 2048,
            "replica": 1,
            "name": "name",
            "cpu": 1,
            "storage": 50,
            "networks": [
                {
                    "label": "label",
                    "isManagement": true
                }
            ],
            "labels": [
                "labels",
                "labels"
            ]
        }
    ],
    "name": "name",
    "workerNodes": [
        {
            "cloneMode": "fullClone",
            "memory": 2048,
            "replica": 1,
            "name": "name",
            "cpu": 2,
            "storage": 50,
            "networks": [
                {
                    "label": "label",
                    "isManagement": true
                },
                {
                    "label": "label",
                    "isManagement": true
                }
            ],
            "config": {
                "healthCheck": {
                    "unhealthyConditions": [
                        {
                            "type": "Ready",
                            "timeout": "timeout",
                            "status": true
                        },
                        {
                            "type": "Ready",
                            "timeout": "timeout",
                            "status": true
                        }
                    ],
                    "nodeStartupTimeout": "20m0s"
                },
                "cpuManagerPolicy": {
                    "type": "kubernetes",
                    "properties": {
                        "systemReserved": {
                            "memoryInGiB": 1,
                            "cpu": 1
                        },
                        "kubeReserved": {
                            "memoryInGiB": 1,
                            "cpu": 1
                        }
                    },
                    "policy": "static"
                }
            },
            "labels": [
                "labels",
                "labels"
            ]
        },
        {
            "cloneMode": "fullClone",
            "memory": 2048,
            "replica": 1,
            "name": "name",
            "cpu": 2,
            "storage": 50,
            "networks": [
                {
                    "label": "label",
                    "isManagement": true
                },
                {
                    "label": "label",
                    "isManagement": true
                }
            ],
            "config": {
                "healthCheck": {
                    "unhealthyConditions": [
                        {
                            "type": "Ready",
                            "timeout": "timeout",
                            "status": true
                        },
                        {
                            "type": "Ready",
                            "timeout": "timeout",
                            "status": true
                        }
                    ],
                    "nodeStartupTimeout": "20m0s"
                },
                "cpuManagerPolicy": {
                    "type": "kubernetes",
                    "properties": {
                        "systemReserved": {
                            "memoryInGiB": 1,
                            "cpu": 1
                        },
                        "kubeReserved": {
                            "memoryInGiB": 1,
                            "cpu": 1
                        }
                    },
                    "policy": "static"
                }
            },
            "labels": [
                "labels",
                "labels"
            ]
        }
    ],
    "description": "description",
    "id": "id",
    "tags": [
        {
            "name": "name",
            "autoCreated": true
        },
        {
            "name": "name",
            "autoCreated": true
        }
    ]
}
string
clusterType
Required

Type of the cluster template.

Possible values are : MANAGEMENT, WORKLOAD,
clusterConfig
Required

clusterConfig

string
description
Optional

description

masterNodes
Required

Control plane nodes configurations

string
name
Required

name

string
id
Optional

id

tags
Optional

tags

workerNodes
Optional

List of nodepools configurations

Authentication
This operation uses the following authentication methods.
Responses
200

Successfully created cluster template.

Returns clusterTemplate of type(s) application/json
{
    "clusterType": "MANAGEMENT",
    "clusterConfig": {
        "csi": [
            {
                "name": "vsphere-csi",
                "properties": {
                    "isDefault": true,
                    "name": "name",
                    "timeout": "timeout"
                }
            },
            {
                "name": "vsphere-csi",
                "properties": {
                    "isDefault": true,
                    "name": "name",
                    "timeout": "timeout"
                }
            }
        ],
        "tools": [
            {
                "name": "helm",
                "version": "version"
            },
            {
                "name": "helm",
                "version": "version"
            }
        ],
        "cni": [
            {
                "name": "calico",
                "properties": "{}"
            },
            {
                "name": "calico",
                "properties": "{}"
            }
        ],
        "kubernetesVersion": "kubernetesVersion"
    },
    "masterNodes": [
        {
            "cloneMode": "fullClone",
            "memory": 2048,
            "replica": 1,
            "name": "name",
            "cpu": 1,
            "storage": 50,
            "networks": [
                {
                    "label": "label",
                    "isManagement": true
                }
            ],
            "labels": [
                "labels",
                "labels"
            ]
        }
    ],
    "name": "name",
    "workerNodes": [
        {
            "cloneMode": "fullClone",
            "memory": 2048,
            "replica": 1,
            "name": "name",
            "cpu": 2,
            "storage": 50,
            "networks": [
                {
                    "label": "label",
                    "isManagement": true
                },
                {
                    "label": "label",
                    "isManagement": true
                }
            ],
            "config": {
                "healthCheck": {
                    "unhealthyConditions": [
                        {
                            "type": "Ready",
                            "timeout": "timeout",
                            "status": true
                        },
                        {
                            "type": "Ready",
                            "timeout": "timeout",
                            "status": true
                        }
                    ],
                    "nodeStartupTimeout": "20m0s"
                },
                "cpuManagerPolicy": {
                    "type": "kubernetes",
                    "properties": {
                        "systemReserved": {
                            "memoryInGiB": 1,
                            "cpu": 1
                        },
                        "kubeReserved": {
                            "memoryInGiB": 1,
                            "cpu": 1
                        }
                    },
                    "policy": "static"
                }
            },
            "labels": [
                "labels",
                "labels"
            ]
        },
        {
            "cloneMode": "fullClone",
            "memory": 2048,
            "replica": 1,
            "name": "name",
            "cpu": 2,
            "storage": 50,
            "networks": [
                {
                    "label": "label",
                    "isManagement": true
                },
                {
                    "label": "label",
                    "isManagement": true
                }
            ],
            "config": {
                "healthCheck": {
                    "unhealthyConditions": [
                        {
                            "type": "Ready",
                            "timeout": "timeout",
                            "status": true
                        },
                        {
                            "type": "Ready",
                            "timeout": "timeout",
                            "status": true
                        }
                    ],
                    "nodeStartupTimeout": "20m0s"
                },
                "cpuManagerPolicy": {
                    "type": "kubernetes",
                    "properties": {
                        "systemReserved": {
                            "memoryInGiB": 1,
                            "cpu": 1
                        },
                        "kubeReserved": {
                            "memoryInGiB": 1,
                            "cpu": 1
                        }
                    },
                    "policy": "static"
                }
            },
            "labels": [
                "labels",
                "labels"
            ]
        }
    ],
    "description": "description",
    "id": "id",
    "tags": [
        {
            "name": "name",
            "autoCreated": true
        },
        {
            "name": "name",
            "autoCreated": true
        }
    ]
}
string
clusterType
Required

Type of the cluster template.

Possible values are : MANAGEMENT, WORKLOAD,
clusterConfig
Required

clusterConfig

string
description
Optional

description

masterNodes
Required

Control plane nodes configurations

string
name
Required

name

string
id
Optional

id

tags
Optional

tags

workerNodes
Optional

List of nodepools configurations


500

Internal Server Error

Returns errorResponse of type(s) application/json
{
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}
array of error
errors
Optional

errors