Skip to content

Commit

Permalink
feat: support specifying cluster by name in addition to API server UR…
Browse files Browse the repository at this point in the history
…L in Cluster API (argoproj#8077)

Signed-off-by: Alexander Matyushentsev <[email protected]>
  • Loading branch information
Alexander Matyushentsev authored Jan 3, 2022
1 parent 9cb9a38 commit 48d46e3
Show file tree
Hide file tree
Showing 8 changed files with 660 additions and 148 deletions.
118 changes: 87 additions & 31 deletions assets/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1605,6 +1605,18 @@
"type": "string",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "type is the type of the specified cluster identifier ( \"server\" - default, \"name\" ).",
"name": "id.type",
"in": "query"
},
{
"type": "string",
"description": "value holds the cluster server URL or cluster name.",
"name": "id.value",
"in": "query"
}
],
"responses": {
Expand Down Expand Up @@ -1659,36 +1671,35 @@
}
}
},
"/api/v1/clusters/{cluster.server}": {
"put": {
"/api/v1/clusters/{id.value}": {
"get": {
"tags": [
"ClusterService"
],
"summary": "Update updates a cluster",
"operationId": "ClusterService_Update",
"summary": "Get returns a cluster by server address",
"operationId": "ClusterService_Get",
"parameters": [
{
"type": "string",
"description": "Server is the API server URL of the Kubernetes cluster",
"name": "cluster.server",
"description": "value holds the cluster server URL or cluster name",
"name": "id.value",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1alpha1Cluster"
}
"type": "string",
"name": "server",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"name": "updatedFields",
"type": "string",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "type is the type of the specified cluster identifier ( \"server\" - default, \"name\" ).",
"name": "id.type",
"in": "query"
}
],
Expand All @@ -1706,25 +1717,42 @@
}
}
}
}
},
"/api/v1/clusters/{server}": {
"get": {
},
"put": {
"tags": [
"ClusterService"
],
"summary": "Get returns a cluster by server address",
"operationId": "ClusterService_Get",
"summary": "Update updates a cluster",
"operationId": "ClusterService_Update",
"parameters": [
{
"type": "string",
"name": "server",
"description": "value holds the cluster server URL or cluster name",
"name": "id.value",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1alpha1Cluster"
}
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"name": "updatedFields",
"in": "query"
},
{
"type": "string",
"name": "name",
"description": "type is the type of the specified cluster identifier ( \"server\" - default, \"name\" ).",
"name": "id.type",
"in": "query"
}
],
Expand Down Expand Up @@ -1752,14 +1780,26 @@
"parameters": [
{
"type": "string",
"name": "server",
"description": "value holds the cluster server URL or cluster name",
"name": "id.value",
"in": "path",
"required": true
},
{
"type": "string",
"name": "server",
"in": "query"
},
{
"type": "string",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "type is the type of the specified cluster identifier ( \"server\" - default, \"name\" ).",
"name": "id.type",
"in": "query"
}
],
"responses": {
Expand All @@ -1778,7 +1818,7 @@
}
}
},
"/api/v1/clusters/{server}/invalidate-cache": {
"/api/v1/clusters/{id.value}/invalidate-cache": {
"post": {
"tags": [
"ClusterService"
Expand All @@ -1788,7 +1828,8 @@
"parameters": [
{
"type": "string",
"name": "server",
"description": "value holds the cluster server URL or cluster name",
"name": "id.value",
"in": "path",
"required": true
}
Expand All @@ -1809,7 +1850,7 @@
}
}
},
"/api/v1/clusters/{server}/rotate-auth": {
"/api/v1/clusters/{id.value}/rotate-auth": {
"post": {
"tags": [
"ClusterService"
Expand All @@ -1819,7 +1860,8 @@
"parameters": [
{
"type": "string",
"name": "server",
"description": "value holds the cluster server URL or cluster name",
"name": "id.value",
"in": "path",
"required": true
}
Expand Down Expand Up @@ -3530,6 +3572,20 @@
}
}
},
"clusterClusterID": {
"type": "object",
"title": "ClusterID holds a cluster server URL or cluster name",
"properties": {
"type": {
"type": "string",
"title": "type is the type of the specified cluster identifier ( \"server\" - default, \"name\" )"
},
"value": {
"type": "string",
"title": "value holds the cluster server URL or cluster name"
}
}
},
"clusterClusterResponse": {
"type": "object"
},
Expand Down
Loading

0 comments on commit 48d46e3

Please sign in to comment.