From f0775ce873a17786ec1f7ef8a7df4c7bdbcba034 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Thu, 2 Apr 2020 16:52:48 -0400 Subject: [PATCH 1/4] Add tags to create LKE cluster cli example --- openapi.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 3cd55c8a5..68f34114a 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6132,7 +6132,8 @@ paths: --region us-central \ --version 1.16 \ --node_pools.type g6-standard-4 --node_pools.count 6 \ - --node_pools.type g6-standard-8 --node_pools.count 3 + --node_pools.type g6-standard-8 --node_pools.count 3 \ + --tags ecomm /lke/clusters/{clusterId}: parameters: - name: clusterId From 820907c532cc313d282263ae46372649d5d6d670 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Thu, 2 Apr 2020 19:05:00 -0400 Subject: [PATCH 2/4] Update PUT /lke/clusters/{clusterId} Add tags to request Update response to include tags and missing properties --- openapi.yaml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 68f34114a..e3e82f11c 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6208,13 +6208,32 @@ paths: properties: label: $ref: '#/components/schemas/LKEClusterRequestBody/properties/label' + tags: + $ref: '#/components/schemas/LKEClusterRequestBody/properties/tags' responses: '200': description: Returns a single Kubernetes cluster. content: application/json: schema: - $ref: '#/components/schemas/LKECluster' + properties: + label: + $ref: '#/components/schemas/LKECluster/properties/label' + tags: + x-linode-filterable: true + example: + - prod + - monitoring + - ecomm + - blog + created: + $ref: '#/components/schemas/LKECluster/properties/created' + updated: + $ref: '#/components/schemas/LKECluster/properties/updated' + region: + $ref: '#/components/schemas/LKECluster/properties/region' + version: + $ref: '#/components/schemas/LKECluster/properties/version' x-code-samples: - lang: Shell source: > @@ -6222,12 +6241,15 @@ paths: -H "Authorization: Bearer $TOKEN" \ -X PUT -d '{ "label": "lkecluster54321" + "tags" : ["prod", "monitoring"] }' \ https://api.linode.com/v4beta/lke/clusters/12345 - lang: CLI source: > linode-cli lke cluster-update 12345 \ - --label lkecluster54321 + --label lkecluster54321 \ + --tags prod + --tags monitoring delete: operationId: deleteLKECluster x-linode-cli-action: cluster-delete From aacfbf7bc55c8459cc52551e76a5bb7fefc3f202 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Fri, 3 Apr 2020 11:54:43 -0400 Subject: [PATCH 3/4] Add information about deleting tags with PUT /lke/clusters/{clusterId} --- openapi.yaml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index e3e82f11c..0142c86e9 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6209,7 +6209,18 @@ paths: label: $ref: '#/components/schemas/LKEClusterRequestBody/properties/label' tags: - $ref: '#/components/schemas/LKEClusterRequestBody/properties/tags' + x-linode-filterable: true + type: array + items: + type: string + example: + - prod + - monitoring + - ecomm + - blog + description: > + An array of tags applied to the Kubernetes cluster. Tags are for organizational purposes only. + To delete a tag, exclude it from your `tags` array. responses: '200': description: Returns a single Kubernetes cluster. @@ -6221,11 +6232,17 @@ paths: $ref: '#/components/schemas/LKECluster/properties/label' tags: x-linode-filterable: true + type: array + items: + type: string example: - prod - monitoring - ecomm - blog + description: > + An array of tags applied to the Kubernetes cluster. Tags are for organizational purposes only. + To delete a tag, exclude it from your `tags` array. created: $ref: '#/components/schemas/LKECluster/properties/created' updated: @@ -6241,14 +6258,16 @@ paths: -H "Authorization: Bearer $TOKEN" \ -X PUT -d '{ "label": "lkecluster54321" - "tags" : ["prod", "monitoring"] + "tags" : ["ecomm", "blog", "prod", "monitoring"] }' \ https://api.linode.com/v4beta/lke/clusters/12345 - lang: CLI source: > linode-cli lke cluster-update 12345 \ --label lkecluster54321 \ - --tags prod + --tags ecomm \ + --tags blog \ + --tags prod \ --tags monitoring delete: operationId: deleteLKECluster From 586372221585d54af05062e669bc9e44201fb15a Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Mon, 6 Apr 2020 09:48:40 -0400 Subject: [PATCH 4/4] Remove filterable on tags property Implementation for filtering has not yet been added. --- openapi.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 0142c86e9..f31bac437 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6209,7 +6209,6 @@ paths: label: $ref: '#/components/schemas/LKEClusterRequestBody/properties/label' tags: - x-linode-filterable: true type: array items: type: string @@ -15750,7 +15749,6 @@ components: x-linode-filterable: true example: "1.16" tags: - x-linode-filterable: true example: - ecomm - blogs