From 5b1f20698a728a907c8d02d2f919b1489e6d7cf5 Mon Sep 17 00:00:00 2001 From: Aleksandr Semenov Date: Thu, 5 Dec 2024 13:10:21 +0300 Subject: [PATCH] chore(CLOUDDEV-642): Mark k8s as deprecated --- edgecenter/data_source_edgecenter_k8s.go | 5 +++-- .../data_source_edgecenter_k8s_client_config.go | 5 +++-- edgecenter/data_source_edgecenter_k8s_pool.go | 5 +++-- edgecenter/resource_edgecenter_k8s.go | 11 ++++++----- edgecenter/resource_edgecenter_k8s_pool.go | 11 ++++++----- 5 files changed, 21 insertions(+), 16 deletions(-) diff --git a/edgecenter/data_source_edgecenter_k8s.go b/edgecenter/data_source_edgecenter_k8s.go index 11b392d2..8830e1ad 100644 --- a/edgecenter/data_source_edgecenter_k8s.go +++ b/edgecenter/data_source_edgecenter_k8s.go @@ -14,8 +14,9 @@ import ( func dataSourceK8s() *schema.Resource { return &schema.Resource{ - ReadContext: dataSourceK8sRead, - Description: "Represent k8s cluster with one default pool.", + DeprecationMessage: "!> **WARNING:** This data source is deprecated and will be removed in the next major version. Data source \"edgecenter_k8s\" unavailable.", + ReadContext: dataSourceK8sRead, + Description: "Represent k8s cluster with one default pool.", Schema: map[string]*schema.Schema{ "project_id": { Type: schema.TypeInt, diff --git a/edgecenter/data_source_edgecenter_k8s_client_config.go b/edgecenter/data_source_edgecenter_k8s_client_config.go index 83aa7dcb..eb808f3a 100644 --- a/edgecenter/data_source_edgecenter_k8s_client_config.go +++ b/edgecenter/data_source_edgecenter_k8s_client_config.go @@ -12,8 +12,9 @@ import ( func dataSourceK8sClientConfig() *schema.Resource { return &schema.Resource{ - ReadContext: dataSourceK8sReadClientConfig, - Description: "Represent k8s cluster with one default pool.", + DeprecationMessage: "!> **WARNING:** This data source is deprecated and will be removed in the next major version. Data source \"edgecenter_k8s_client_config\" unavailable.", + ReadContext: dataSourceK8sReadClientConfig, + Description: "Represent k8s cluster with one default pool.", Schema: map[string]*schema.Schema{ "project_id": { Type: schema.TypeInt, diff --git a/edgecenter/data_source_edgecenter_k8s_pool.go b/edgecenter/data_source_edgecenter_k8s_pool.go index 9ac6255b..8859cefd 100644 --- a/edgecenter/data_source_edgecenter_k8s_pool.go +++ b/edgecenter/data_source_edgecenter_k8s_pool.go @@ -13,8 +13,9 @@ import ( func dataSourceK8sPool() *schema.Resource { return &schema.Resource{ - ReadContext: dataSourceK8sPoolRead, - Description: "Represent k8s cluster's pool.", + DeprecationMessage: "!> **WARNING:** This data source is deprecated and will be removed in the next major version. Data source \"edgecenter_k8s_pool\" unavailable.", + ReadContext: dataSourceK8sPoolRead, + Description: "Represent k8s cluster's pool.", Schema: map[string]*schema.Schema{ "project_id": { Type: schema.TypeInt, diff --git a/edgecenter/resource_edgecenter_k8s.go b/edgecenter/resource_edgecenter_k8s.go index 84705c1f..1e68acda 100644 --- a/edgecenter/resource_edgecenter_k8s.go +++ b/edgecenter/resource_edgecenter_k8s.go @@ -27,11 +27,12 @@ var k8sCreateTimeout = time.Second * time.Duration(K8sCreateTimeout) func resourceK8s() *schema.Resource { return &schema.Resource{ - CreateContext: resourceK8sCreate, - ReadContext: resourceK8sRead, - UpdateContext: resourceK8sUpdate, - DeleteContext: resourceK8sDelete, - Description: "Represent k8s cluster with one default pool.", + DeprecationMessage: "!> **WARNING:** This resource is deprecated and will be removed in the next major version. Resource \"edgecenter_k8s\" unavailable.", + CreateContext: resourceK8sCreate, + ReadContext: resourceK8sRead, + UpdateContext: resourceK8sUpdate, + DeleteContext: resourceK8sDelete, + Description: "Represent k8s cluster with one default pool.", Timeouts: &schema.ResourceTimeout{ Create: &k8sCreateTimeout, Update: &k8sCreateTimeout, diff --git a/edgecenter/resource_edgecenter_k8s_pool.go b/edgecenter/resource_edgecenter_k8s_pool.go index ed7c0654..143f9dd1 100644 --- a/edgecenter/resource_edgecenter_k8s_pool.go +++ b/edgecenter/resource_edgecenter_k8s_pool.go @@ -19,11 +19,12 @@ import ( func resourceK8sPool() *schema.Resource { return &schema.Resource{ - CreateContext: resourceK8sPoolCreate, - ReadContext: resourceK8sPoolRead, - UpdateContext: resourceK8sPoolUpdate, - DeleteContext: resourceK8sPoolDelete, - Description: "Represent k8s cluster's pool.", + DeprecationMessage: "!> **WARNING:** This resource is deprecated and will be removed in the next major version. Resource \"edgecenter_k8s_pool\" unavailable.", + CreateContext: resourceK8sPoolCreate, + ReadContext: resourceK8sPoolRead, + UpdateContext: resourceK8sPoolUpdate, + DeleteContext: resourceK8sPoolDelete, + Description: "Represent k8s cluster's pool.", Timeouts: &schema.ResourceTimeout{ Create: &k8sCreateTimeout, Update: &k8sCreateTimeout,