Skip to content

Commit 77441ff

Browse files
deprecate unversioned Kubernetes resources and data source
1 parent be88f44 commit 77441ff

5 files changed

+26
-21
lines changed

kubernetes/data_source_kubernetes_ingress.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ func dataSourceKubernetesIngress() *schema.Resource {
2323
docIngressSpec := networking.IngressSpec{}.SwaggerDoc()
2424

2525
return &schema.Resource{
26-
Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. This data source allows you to pull data about such ingress.",
27-
ReadContext: dataSourceKubernetesIngressRead,
26+
DeprecationMessage: "Deprecated: this data source will be removed in the next major version of the provider. Use kubernetes_ingress_v1 instead.",
27+
Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. This data source allows you to pull data about such ingress.",
28+
ReadContext: dataSourceKubernetesIngressRead,
2829
Schema: map[string]*schema.Schema{
2930
"metadata": namespacedMetadataSchema("ingress", false),
3031
"spec": {

kubernetes/resource_kubernetes_certificate_signing_request.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ func resourceKubernetesCertificateSigningRequest() *schema.Resource {
2424
apiDocStatus := v1beta1.CertificateSigningRequestStatus{}.SwaggerDoc()
2525

2626
return &schema.Resource{
27-
Description: "Use this resource to generate TLS certificates using Kubernetes. This is a *logical resource*, so it contributes only to the current Terraform state and does not persist any external managed resources. This resource enables automation of [X.509](https://www.itu.int/rec/T-REC-X.509) credential provisioning (including TLS/SSL certificates). It does this by creating a CertificateSigningRequest using the Kubernetes API, which generates a certificate from the Certificate Authority (CA) configured in the Kubernetes cluster. The CSR can be approved automatically by Terraform, or it can be approved by a custom controller running in Kubernetes. See [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/) for all available options pertaining to CertificateSigningRequests.",
28-
CreateContext: resourceKubernetesCertificateSigningRequestCreate,
29-
ReadContext: resourceKubernetesCertificateSigningRequestRead,
30-
DeleteContext: resourceKubernetesCertificateSigningRequestDelete,
27+
DeprecationMessage: "Deprecated: this resource will be removed in the next major version of the provider. Use kubernetes_certificate_signing_request_v1 instead.",
28+
Description: "Use this resource to generate TLS certificates using Kubernetes. This is a *logical resource*, so it contributes only to the current Terraform state and does not persist any external managed resources. This resource enables automation of [X.509](https://www.itu.int/rec/T-REC-X.509) credential provisioning (including TLS/SSL certificates). It does this by creating a CertificateSigningRequest using the Kubernetes API, which generates a certificate from the Certificate Authority (CA) configured in the Kubernetes cluster. The CSR can be approved automatically by Terraform, or it can be approved by a custom controller running in Kubernetes. See [Kubernetes reference](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/) for all available options pertaining to CertificateSigningRequests.",
29+
CreateContext: resourceKubernetesCertificateSigningRequestCreate,
30+
ReadContext: resourceKubernetesCertificateSigningRequestRead,
31+
DeleteContext: resourceKubernetesCertificateSigningRequestDelete,
3132
Importer: &schema.ResourceImporter{
3233
StateContext: schema.ImportStatePassthroughContext,
3334
},

kubernetes/resource_kubernetes_horizontal_pod_autoscaler.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ import (
1818

1919
func resourceKubernetesHorizontalPodAutoscaler() *schema.Resource {
2020
return &schema.Resource{
21-
Description: "Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization.",
22-
CreateContext: resourceKubernetesHorizontalPodAutoscalerCreate,
23-
ReadContext: resourceKubernetesHorizontalPodAutoscalerRead,
24-
UpdateContext: resourceKubernetesHorizontalPodAutoscalerUpdate,
25-
DeleteContext: resourceKubernetesHorizontalPodAutoscalerDelete,
21+
DeprecationMessage: "Deprecated: this resource will be removed in the next major version of the provider. Use kubernetes_horizontal_pod_autoscaler_v2 (or _v1) instead.",
22+
Description: "Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization.",
23+
CreateContext: resourceKubernetesHorizontalPodAutoscalerCreate,
24+
ReadContext: resourceKubernetesHorizontalPodAutoscalerRead,
25+
UpdateContext: resourceKubernetesHorizontalPodAutoscalerUpdate,
26+
DeleteContext: resourceKubernetesHorizontalPodAutoscalerDelete,
2627
Importer: &schema.ResourceImporter{
2728
StateContext: schema.ImportStatePassthroughContext,
2829
},

kubernetes/resource_kubernetes_mutating_webhook_configuration.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ func resourceKubernetesMutatingWebhookConfiguration() *schema.Resource {
2424
apiDoc := admissionregistrationv1.MutatingWebhookConfiguration{}.SwaggerDoc()
2525
webhookDoc := admissionregistrationv1.MutatingWebhook{}.SwaggerDoc()
2626
return &schema.Resource{
27-
Description: "Mutating Webhook Configuration configures a [mutating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks).",
28-
CreateContext: resourceKubernetesMutatingWebhookConfigurationCreate,
29-
ReadContext: resourceKubernetesMutatingWebhookConfigurationRead,
30-
UpdateContext: resourceKubernetesMutatingWebhookConfigurationUpdate,
31-
DeleteContext: resourceKubernetesMutatingWebhookConfigurationDelete,
27+
DeprecationMessage: "Deprecated: this resource will be removed in the next major version of the provider. Use kubernetes_mutating_webhook_configuration_v1 instead.",
28+
Description: "Mutating Webhook Configuration configures a [mutating admission webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks).",
29+
CreateContext: resourceKubernetesMutatingWebhookConfigurationCreate,
30+
ReadContext: resourceKubernetesMutatingWebhookConfigurationRead,
31+
UpdateContext: resourceKubernetesMutatingWebhookConfigurationUpdate,
32+
DeleteContext: resourceKubernetesMutatingWebhookConfigurationDelete,
3233
Importer: &schema.ResourceImporter{
3334
StateContext: schema.ImportStatePassthroughContext,
3435
},

kubernetes/resource_kubernetes_pod_disruption_budget.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ var (
2626

2727
func resourceKubernetesPodDisruptionBudget() *schema.Resource {
2828
return &schema.Resource{
29-
Description: "A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total.",
30-
CreateContext: resourceKubernetesPodDisruptionBudgetCreate,
31-
ReadContext: resourceKubernetesPodDisruptionBudgetRead,
32-
UpdateContext: resourceKubernetesPodDisruptionBudgetUpdate,
33-
DeleteContext: resourceKubernetesPodDisruptionBudgetDelete,
29+
DeprecationMessage: "Deprecated: this resource will be removed in the next major version of the provider. Use kubernetes_pod_disruption_budget_v1 instead.",
30+
Description: "A Pod Disruption Budget limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. A web front end might want to ensure that the number of replicas serving load never falls below a certain percentage of the total.",
31+
CreateContext: resourceKubernetesPodDisruptionBudgetCreate,
32+
ReadContext: resourceKubernetesPodDisruptionBudgetRead,
33+
UpdateContext: resourceKubernetesPodDisruptionBudgetUpdate,
34+
DeleteContext: resourceKubernetesPodDisruptionBudgetDelete,
3435
Importer: &schema.ResourceImporter{
3536
StateContext: schema.ImportStatePassthroughContext,
3637
},

0 commit comments

Comments
 (0)