From 819babee0c9b057abea12115a5220f42e97c5e40 Mon Sep 17 00:00:00 2001 From: Adam Mohammed Date: Wed, 8 Apr 2020 11:22:45 -0400 Subject: [PATCH 01/11] Correct LKENodeStatus schema - field id is of type string --- openapi.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 50c1562f5..d4ca5cedc 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -15812,11 +15812,11 @@ components: readOnly: true properties: id: - type: number + type: string description: > The Node's ID. x-linode-filterable: true - example: 123456 + example: "123456" instance_id: type: string description: > From 67adf64be3cdcc071599b439260700ca793402b2 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Thu, 9 Apr 2020 11:49:08 -0400 Subject: [PATCH 02/11] Update LKE collection property from version to k8s_version --- openapi.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index b3c188788..d2240b067 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -15700,7 +15700,7 @@ components: type: string description: This Kubernetes cluster's location. example: us-central - version: + k8s_version: type: string description: > The desired Kubernetes version for this Kubernetes cluster in the format of <major>.<minor>, @@ -15756,7 +15756,7 @@ components: x-linode-filterable: true x-linode-cli-display: 3 example: us-central - version: + k8s_version: x-linode-filterable: true example: "1.16" tags: From 997d3afe23a94b59af5f06f927faf117a2e3cf11 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Thu, 9 Apr 2020 11:58:13 -0400 Subject: [PATCH 03/11] Update references to version field to use k8s_version --- openapi.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index d2240b067..55be1ead6 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6248,8 +6248,8 @@ paths: $ref: '#/components/schemas/LKECluster/properties/updated' region: $ref: '#/components/schemas/LKECluster/properties/region' - version: - $ref: '#/components/schemas/LKECluster/properties/version' + k8s_version: + $ref: '#/components/schemas/LKECluster/properties/k8s_version' x-code-samples: - lang: Shell source: > From da031e105438911f33a525478a4a8405ce08ab51 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Thu, 9 Apr 2020 12:29:01 -0400 Subject: [PATCH 04/11] Update shell and CLI examples --- openapi.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 55be1ead6..2a6b89f33 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6091,7 +6091,7 @@ paths: required: - label - region - - version + - k8s_version - node_pools allOf: - $ref: '#/components/schemas/LKEClusterRequestBody' @@ -6117,7 +6117,7 @@ paths: -X POST -d '{ "label": "cluster12345", "region": "us-central", - "version": "1.16", + "k8s_version": "1.16", "tags": ["ecomm", "blogs"], "node_pools": [ { "type": "g6-standard-4", "count": 6}, @@ -6130,7 +6130,7 @@ paths: linode-cli lke cluster-create \ --label cluster12345 \ --region us-central \ - --version 1.16 \ + --k8s_version 1.16 \ --node_pools.type g6-standard-4 --node_pools.count 6 \ --node_pools.type g6-standard-8 --node_pools.count 3 \ --tags ecomm @@ -15757,7 +15757,6 @@ components: x-linode-cli-display: 3 example: us-central k8s_version: - x-linode-filterable: true example: "1.16" tags: example: From 863bd6fc59edc401fbf40f60fbeca2c18d2b2b30 Mon Sep 17 00:00:00 2001 From: nmelehan Date: Thu, 9 Apr 2020 12:52:39 -0400 Subject: [PATCH 05/11] Update version to k8s_version in required properties of LKEClusterRequestBody --- openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 2a6b89f33..b739d2350 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -15718,7 +15718,7 @@ components: required: - label - region - - version + - k8s_version LKECluster: type: object # Note that LKECluster inherits all properties of From db2d3135aa7b06e7fa0c20657fdf2e618ee35ed8 Mon Sep 17 00:00:00 2001 From: Adam Mohammed Date: Wed, 8 Apr 2020 11:23:19 -0400 Subject: [PATCH 06/11] Remove filterable status from LKE fields that are not filterable --- openapi.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index d4ca5cedc..8f96b1d16 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -15748,16 +15748,13 @@ components: # LKEClusterRequestBody but otherwise inherit all of the original # sub-properties. label: - x-linode-filterable: true x-linode-cli-display: 2 example: lkecluster12345 region: readOnly: true - x-linode-filterable: true x-linode-cli-display: 3 example: us-central version: - x-linode-filterable: true example: "1.16" tags: example: @@ -15815,7 +15812,6 @@ components: type: string description: > The Node's ID. - x-linode-filterable: true example: "123456" instance_id: type: string From bda48965a5d168eb0f3ca2ab1711764ace54123f Mon Sep 17 00:00:00 2001 From: nmelehan Date: Thu, 9 Apr 2020 13:58:15 -0400 Subject: [PATCH 07/11] Add time expectations for cluster creation --- openapi.yaml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 9902cf4f5..3104420ce 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6072,11 +6072,13 @@ paths: servers: - url: https://api.linode.com/v4beta summary: Create Kubernetes Cluster - description: > + description: | Creates a Kubernetes cluster. The Kubernetes cluster will be created asynchronously. You can use the events system to determine when the - Kubernetes cluster is ready to use. - + Kubernetes cluster is ready to use. Please note that it often takes 2-5 minutes before the + [Kubernetes API server endpoint](/api/v4/lke-clusters-cluster-id-api-endpoint) and + the [Kubeconfig file](/api/v4/lke-clusters-cluster-id-kubeconfig) for the new cluster + are ready. **Beta**: This endpoint is in private beta. Please make sure to prepend all requests with `/v4beta` instead of `/v4`, and be aware that this endpoint may receive breaking @@ -6606,9 +6608,10 @@ paths: servers: - url: https://api.linode.com/v4beta summary: View Kubernetes API Endpoint - description: > - Get the Kubernetes API server endpoint for this cluster. - + description: | + Get the Kubernetes API server endpoint for this cluster. Please note that it often takes + 2-5 minutes before the endpoint is ready after first + [creating a new cluster](/api/v4/lke-clusters/#post). **Beta**: This endpoint is in private beta. Please make sure to prepend all requests with `/v4beta` instead of `/v4`, and be aware that this endpoint may receive breaking @@ -6659,9 +6662,9 @@ paths: servers: - url: https://api.linode.com/v4beta summary: View Kubeconfig - description: > - Get the Kubeconfig file for a Cluster. - + description: | + Get the Kubeconfig file for a Cluster. Please note that it often takes 2-5 minutes before + the Kubeconfig file is ready after first [creating a new cluster](/api/v4/lke-clusters/#post). **Beta**: This endpoint is in private beta. Please make sure to prepend all requests with `/v4beta` instead of `/v4`, and be aware that this endpoint may receive breaking From 32f3158a1734162687dfeb1bf4047a3fe512f0f5 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Thu, 9 Apr 2020 14:48:58 -0400 Subject: [PATCH 08/11] Add new endpoint /lke/clusters/{clusterId}/api-endpoints --- openapi.yaml | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index b3c188788..a09347a28 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6585,6 +6585,67 @@ paths: - lang: CLI source: > linode-cli lke pool-delete 12345 456 + /lke/clusters/{clusterId}/api-endpoints: + parameters: + - name: clusterId + in: path + description: ID of the Kubernetes cluster to look up. + required: true + schema: + type: integer + x-linode-cli-command: lke + get: + operationId: getLKEClusterAPIEndpoints + x-linode-cli-action: api-endpoints-list + security: + - personalAccessToken: [] + - oauth: + - lke:read_only + tags: + - Linode Kubernetes Engine (LKE) + servers: + - url: https://api.linode.com/v4beta + summary: List Kubernetes API Endpoint + description: > + Get the Kubernetes API server endpoints for this cluster. Please note that it often takes + 2-5 minutes before the endpoint is ready after first [creating a new cluster](/api/v4/lke-clusters/#post). + + + **Beta**: This endpoint is in private beta. Please make sure to prepend all requests with + `/v4beta` instead of `/v4`, and be aware that this endpoint may receive breaking + updates in the future. This notice will be removed when this endpoint is out of + beta. Sign up for the beta [here](https://welcome.linode.com/lkebeta/). + responses: + '200': + description: Returns the Kubernetes API server endpoints for this cluster. + content: + application/json: + schema: + type: object + properties: + endpoints: + type: array + description: > + The Kubernetes API server endpoints for this cluster. + items: + type: object + properties: + endpoint: + type: string + readOnly: true + description: > + A Kubernetes API server endpoint for this cluster. + example: "https://192.0.2.1:6443" + default: + $ref: '#/components/responses/ErrorResponse' + x-code-samples: + - lang: Shell + source: > + curl -H "Authorization: Bearer $TOKEN" \ + https://api.linode.com/v4beta/lke/clusters/12345/api-endpoints + - lang: CLI + source: > + linode-cli lke api-endpoint-list 12345 /lke/clusters/{clusterId}/api-endpoint: parameters: - name: clusterId From 03b333ce01929ac0f3d1dc14bcac7c1d1621255b Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Thu, 9 Apr 2020 15:00:21 -0400 Subject: [PATCH 09/11] Add note about /lke/clusters/{clusterId}/api-endpoint deprecations --- openapi.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index a09347a28..09334f874 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6605,9 +6605,9 @@ paths: - Linode Kubernetes Engine (LKE) servers: - url: https://api.linode.com/v4beta - summary: List Kubernetes API Endpoint + summary: List Kubernetes API Endpoints description: > - Get the Kubernetes API server endpoints for this cluster. Please note that it often takes + List the Kubernetes API server endpoints for this cluster. Please note that it often takes 2-5 minutes before the endpoint is ready after first [creating a new cluster](/api/v4/lke-clusters/#post). @@ -6671,6 +6671,10 @@ paths: Get the Kubernetes API server endpoint for this cluster. + **Note** This endpoint will be deprecated in favor of + [List Kubernetes API Endpoints](/api/v4/lke-clusters-cluster-id-api-endpoints). + + **Beta**: This endpoint is in private beta. Please make sure to prepend all requests with `/v4beta` instead of `/v4`, and be aware that this endpoint may receive breaking updates in the future. This notice will be removed when this endpoint is out of From c680a999b23e64c42c6ad22d3a45cecdc2d21782 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Thu, 9 Apr 2020 15:37:49 -0400 Subject: [PATCH 10/11] Update List Kubernetes API Endpoints response --- openapi.yaml | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 09334f874..444eddc1d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6623,19 +6623,28 @@ paths: schema: type: object properties: - endpoints: + data: type: array - description: > - The Kubernetes API server endpoints for this cluster. items: - type: object - properties: - endpoint: - type: string - readOnly: true - description: > - A Kubernetes API server endpoint for this cluster. - example: "https://192.0.2.1:6443" + endpoints: + type: array + description: > + The Kubernetes API server endpoints for this cluster. + items: + type: object + properties: + endpoint: + type: string + readOnly: true + description: > + A Kubernetes API server endpoint for this cluster. + example: "https://192.0.2.1:6443" + page: + $ref: '#/components/schemas/PaginationEnvelope/properties/page' + pages: + $ref: '#/components/schemas/PaginationEnvelope/properties/pages' + results: + $ref: '#/components/schemas/PaginationEnvelope/properties/results' default: $ref: '#/components/responses/ErrorResponse' x-code-samples: From c30da5a5933702a65ae60e38f30df2341193623e Mon Sep 17 00:00:00 2001 From: nmelehan Date: Thu, 9 Apr 2020 15:47:35 -0400 Subject: [PATCH 11/11] Syntax fixes for data array in response of List Kubernetes API Endpoints --- openapi.yaml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 444eddc1d..ecbfa86ad 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6626,19 +6626,16 @@ paths: data: type: array items: - endpoints: - type: array - description: > - The Kubernetes API server endpoints for this cluster. - items: - type: object - properties: - endpoint: - type: string - readOnly: true - description: > - A Kubernetes API server endpoint for this cluster. - example: "https://192.0.2.1:6443" + type: object + description: > + The Kubernetes API server endpoints for this cluster. + properties: + endpoint: + type: string + readOnly: true + description: > + A Kubernetes API server endpoint for this cluster. + example: "https://192.0.2.1:6443" page: $ref: '#/components/schemas/PaginationEnvelope/properties/page' pages: