Cluster API v0.3.1

License: Apache License 2.0

# Authentication

  • HTTP Authentication, scheme: Bearer

Cluster

# ListClusters

GET /api/v1/clusters

Parameters

Name In Type Required Description
field_selector query string false Filter the list by field. eg: field_selector=cluster_type=physical,usage=worker,worker_type=pipeline Field Support: cluster_type: exact match usage: exact match worker_type: exact match

Example responses

200 Response

{
  "items": [
    {
      "name": "string",
      "cluster_kind": "string",
      "cluster_type": "string",
      "usage": "string",
      "host_cluster": "string",
      "primary_domain": "string",
      "worker_type": "string",
      "api_server": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK (opens new window) OK api.cluster.v1.ListsReply

# GetCluster

GET /api/v1/clusters/{cluster_name}

Parameters

Name In Type Required Description
cluster_name path string true cluster_name is the name of the cluster.

Example responses

200 Response

{
  "name": "string",
  "cluster_kind": "string",
  "cluster_type": "string",
  "usage": "string",
  "host_cluster": "string",
  "primary_domain": "string",
  "worker_type": "string",
  "api_server": "string"
}

Responses

Status Meaning Description Schema
200 OK (opens new window) OK api.cluster.v1.GetReply

# SaveCluster

POST /api/v1/clusters/{cluster_name}

Body parameter

{
  "api_server": "string",
  "cluster_kind": "string",
  "cluster_type": "string",
  "usage": "string",
  "host_cluster": "string",
  "argocd_host": "string",
  "vcluster": {
    "https_node_port": "string"
  },
  "traefik": {
    "http_node_port": "string",
    "https_node_port": "string"
  },
  "kubeconfig": "string",
  "worker_type": "string",
  "primary_domain": "string",
  "tekton_host": "string"
}

Parameters

Name In Type Required Description
cluster_name path string true cluster_name specifies the name of the cluster.
insecure_skip_check query boolean false insecureSkipCheck specifies whether to skip the certificate check when connecting to the API server.
body body api.cluster.v1.SaveRequest_Body true none

Example responses

200 Response

{
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK (opens new window) OK api.cluster.v1.SaveReply

# DeleteCluster

DELETE /api/v1/clusters/{cluster_name}

Parameters

Name In Type Required Description
cluster_name path string true ClusterName is the name of the cluster.
insecure_skip_check query boolean false InsecureSkipCheck specifies whether to skip security checks.

Example responses

200 Response

{
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK (opens new window) OK api.cluster.v1.DeleteReply

# Schemas

api.cluster.v1.DeleteReply

{
  "message": "string"
}

DeleteReply represents a response to a delete request.

# Properties

Name Type Required Restrictions Description
message string false none msg specifies the message of the delete response.

api.cluster.v1.GetReply

{
  "name": "string",
  "cluster_kind": "string",
  "cluster_type": "string",
  "usage": "string",
  "host_cluster": "string",
  "primary_domain": "string",
  "worker_type": "string",
  "api_server": "string"
}

GetReply represents a response to a get request.

# Properties

Name Type Required Restrictions Description
name string false none name is the name of the cluster.
cluster_kind string false none cluster_kind is the kind of the cluster.
cluster_type string false none cluster_type is the type of the cluster.
usage string false none usage is the usage of the cluster.
host_cluster string false none host_cluster specifies the host cluster name if the cluster is a virtual cluster.
primary_domain string false none primary_domain is used to build the domain of components within the cluster.
worker_type string false none worker_type maybe pipeline or deployment, when the cluster usage is 'worker', the WorkType is required.
api_server string false none api_server specifies the API server address of the cluster.

api.cluster.v1.ListsReply

{
  "items": [
    {
      "name": "string",
      "cluster_kind": "string",
      "cluster_type": "string",
      "usage": "string",
      "host_cluster": "string",
      "primary_domain": "string",
      "worker_type": "string",
      "api_server": "string"
    }
  ]
}

ListsReply represents a response to a list request.

# Properties

Name Type Required Restrictions Description
items [api.cluster.v1.GetReply] false none [GetReply represents a response to a get request.]

api.cluster.v1.SaveReply

{
  "message": "string"
}

SaveReply represents a response to a save request.

# Properties

Name Type Required Restrictions Description
message string false none msg specifies the message of the save response.

api.cluster.v1.SaveRequest_Body

{
  "api_server": "string",
  "cluster_kind": "string",
  "cluster_type": "string",
  "usage": "string",
  "host_cluster": "string",
  "argocd_host": "string",
  "vcluster": {
    "https_node_port": "string"
  },
  "traefik": {
    "http_node_port": "string",
    "https_node_port": "string"
  },
  "kubeconfig": "string",
  "worker_type": "string",
  "primary_domain": "string",
  "tekton_host": "string"
}

Body represents the body of the save request.

# Properties

Name Type Required Restrictions Description
api_server string false none api_server specifies the API server address of the cluster.
cluster_kind string false none cluster_kind specifies the kind of the cluster.
cluster_type string false none cluster_type specifies the type of the cluster. It can be "physical" or "virtual".
usage string false none usage specifies the usage of the cluster. It can be "host" or "worker".
host_cluster string false none host_cluster specifies the host cluster name if the cluster is a virtual cluster.
argocd_host string false none argocd_host specifies the ArgoCD host name.
vcluster api.cluster.v1.Vcluster false none Vcluster represents the configuration for the virtual cluster.
traefik api.cluster.v1.Traefik false none Traefik represents the configuration for the Traefik ingress controller.
kubeconfig string false none kubeconfig specifies the Kubeconfig file of the cluster.
worker_type string false none worker_type maybe pipeline or deployment, when the cluster usage is 'worker', the WorkType is required.
primary_domain string false none primary_domain is used to build the domain of components within the cluster.
tekton_host string false none tekton_host is the domain for the tekton dashboard, and it must be a subdomain of the PrimaryDomain

api.cluster.v1.Traefik

{
  "http_node_port": "string",
  "https_node_port": "string"
}

Traefik represents the configuration for the Traefik ingress controller.

# Properties

Name Type Required Restrictions Description
http_node_port string false none httpNodePort specifies the NodePort for the HTTP port of the Traefik ingress controller.
https_node_port string false none httpsNodePort specifies the NodePort for the HTTPS port of the Traefik ingress controller.

api.cluster.v1.Vcluster

{
  "https_node_port": "string"
}

Vcluster represents the configuration for the virtual cluster.

# Properties

Name Type Required Restrictions Description
https_node_port string false none httpsNodePort specifies the NodePort for the HTTPS port of the virtual cluster.