Skip to content

Commit 9bb079b

Browse files
Merge branch 'main' into node-taint-unique-by-key-and-effect
2 parents 855d872 + be88f44 commit 9bb079b

12 files changed

+42
-12
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
## 2.38.0 (Jul 21, 2025)
2+
3+
ENHANCEMENTS:
4+
5+
* Add ResourceIdentity support to kubernetes_manifest [[GH-2737](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2737)]
6+
* Add `sub_path_expr` to volume mount options pod spec [[GH-2622](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2622)]
7+
* Add support for ResourceIdentity to SDKv2 resources [[GH-2751](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2751)]
8+
9+
BUG FIXES:
10+
11+
* Fixed goroutine-safety in the CRD and metadata cache, resulting in far fewer provider metadata requests. [[GH-2699](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2699)]
12+
* `data_source/kubernetes_pod_v1`: fix an issue when the provider cuts out toleration under pod spec(`spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
13+
* `data_source/kubernetes_pod`: fix an issue when the provider cuts out toleration under pod spec(`spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
14+
* `resource/kubernetes_cron_job: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
15+
* `resource/kubernetes_cron_job_v1: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
16+
* `resource/kubernetes_daemon_set_v1: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
17+
* `resource/kubernetes_daemonset: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
18+
* `resource/kubernetes_deployment: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
19+
* `resource/kubernetes_deployment_v1: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
20+
* `resource/kubernetes_job: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
21+
* `resource/kubernetes_job_v1: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
22+
* `resource/kubernetes_replication_controller_v1`: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
23+
* `resource/kubernetes_replication_controller`: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
24+
* `resource/kubernetes_stateful_set: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
25+
* `resource/kubernetes_stateful_set_v1: fix an issue when the provider cuts out toleration under pod spec template(`*.template.spec.toleration`) if it uses a well-known [taint](https://kubernetes.io/docs/reference/labels-annotations-taints/). That could lead to a perpetual diff behavior. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
26+
27+
NOTES:
28+
29+
* We have updated the logic of resources that use the Pod specification template, such as `kubernetes_deployment_v1`, `kubernetes_stateful_set_v1`, etc, and now the provider will keep all tolerations(`spec.toleration`) returned by Kubernetes. The same is applicable for the data sources `kubernetes_pod_v1` and `kubernetes_pod`. The behavior of resources `kubernetes_pod_v1` and `kubernetes_pod` remains unchanged, i.e. the provider will keep removing tolerations with well-known [taints](https://kubernetes.io/docs/reference/labels-annotations-taints/) since they might be attached to the object by Kubernetes controller and could lead to a perpetual diff. [[GH-2380](https://github.com/hashicorp/terraform-provider-kubernetes/issues/2380)]
30+
131
## 2.37.1 (May 21, 2025)
232

333
BUG FIXES:

kubernetes/resource_kubernetes_ingress_class_v1.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func resourceKubernetesIngressClassV1Create(ctx context.Context, d *schema.Resou
113113
log.Printf("[INFO] Submitted new IngressClass: %#v", out)
114114
d.SetId(out.ObjectMeta.GetName())
115115

116-
err = setResourceIdentityNonNamespaced(d, "networking/v1", "IngressClass", out.GetName())
116+
err = setResourceIdentityNonNamespaced(d, "networking.k8s.io/v1", "IngressClass", out.GetName())
117117
if err != nil {
118118
return diag.FromErr(err)
119119
}
@@ -156,7 +156,7 @@ func resourceKubernetesIngressClassV1Read(ctx context.Context, d *schema.Resourc
156156
return diag.FromErr(err)
157157
}
158158

159-
err = setResourceIdentityNonNamespaced(d, "networking/v1", "IngressClass", ing.GetName())
159+
err = setResourceIdentityNonNamespaced(d, "networking.k8s.io/v1", "IngressClass", ing.GetName())
160160
if err != nil {
161161
return diag.FromErr(err)
162162
}

kubernetes/resource_kubernetes_ingress_class_v1_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func TestAccKubernetesIngressClassV1_identity(t *testing.T) {
7575
statecheck.ExpectIdentity(
7676
resourceName, map[string]knownvalue.Check{
7777
"name": knownvalue.StringExact(name),
78-
"api_version": knownvalue.StringExact("networking/v1"),
78+
"api_version": knownvalue.StringExact("networking.k8s.io/v1"),
7979
"kind": knownvalue.StringExact("IngressClass"),
8080
},
8181
),

kubernetes/resource_kubernetes_ingress_v1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ func resourceKubernetesIngressV1Read(ctx context.Context, d *schema.ResourceData
275275
return diag.FromErr(err)
276276
}
277277

278-
err = setResourceIdentityNamespaced(d, "networking/v1", "Ingress", namespace, name)
278+
err = setResourceIdentityNamespaced(d, "networking.k8s.io/v1", "Ingress", namespace, name)
279279
if err != nil {
280280
return diag.FromErr(err)
281281
}

kubernetes/resource_kubernetes_ingress_v1_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ func TestAccKubernetesIngressV1_identity(t *testing.T) {
398398
resourceName, map[string]knownvalue.Check{
399399
"namespace": knownvalue.StringExact("default"),
400400
"name": knownvalue.StringExact(name),
401-
"api_version": knownvalue.StringExact("networking/v1"),
401+
"api_version": knownvalue.StringExact("networking.k8s.io/v1"),
402402
"kind": knownvalue.StringExact("Ingress"),
403403
},
404404
),

kubernetes/resource_kubernetes_mutating_webhook_configuration_v1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func resourceKubernetesMutatingWebhookConfigurationV1Read(ctx context.Context, d
198198
return diag.FromErr(err)
199199
}
200200

201-
err = setResourceIdentityNonNamespaced(d, "admissionregistration/v1", "MutatingWebhookConfiguration", name)
201+
err = setResourceIdentityNonNamespaced(d, "admissionregistration.k8s.io/v1", "MutatingWebhookConfiguration", name)
202202
if err != nil {
203203
return diag.FromErr(err)
204204
}

kubernetes/resource_kubernetes_mutating_webhook_configuration_v1_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func TestAccKubernetesMutatingWebhookConfigurationV1_identity(t *testing.T) {
170170
statecheck.ExpectIdentity(
171171
resourceName, map[string]knownvalue.Check{
172172
"name": knownvalue.StringExact(name),
173-
"api_version": knownvalue.StringExact("admissionregistration/v1"),
173+
"api_version": knownvalue.StringExact("admissionregistration.k8s.io/v1"),
174174
"kind": knownvalue.StringExact("MutatingWebhookConfiguration"),
175175
},
176176
),

kubernetes/resource_kubernetes_network_policy_v1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ func resourceKubernetesNetworkPolicyV1Read(ctx context.Context, d *schema.Resour
313313
if err != nil {
314314
return diag.FromErr(err)
315315
}
316-
err = setResourceIdentityNamespaced(d, "networking/v1", "NetworkPolicy", namespace, name)
316+
err = setResourceIdentityNamespaced(d, "networking.k8s.io/v1", "NetworkPolicy", namespace, name)
317317
if err != nil {
318318
return diag.FromErr(err)
319319
}

kubernetes/resource_kubernetes_network_policy_v1_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ func TestAccKubernetesNetworkPolicyV1_identity(t *testing.T) {
386386
resourceName, map[string]knownvalue.Check{
387387
"namespace": knownvalue.StringExact("default"),
388388
"name": knownvalue.StringExact(name),
389-
"api_version": knownvalue.StringExact("networking/v1"),
389+
"api_version": knownvalue.StringExact("networking.k8s.io/v1"),
390390
"kind": knownvalue.StringExact("NetworkPolicy"),
391391
},
392392
),

kubernetes/resource_kubernetes_validating_webhook_configuration_v1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func resourceKubernetesValidatingWebhookConfigurationV1Read(ctx context.Context,
219219
return diag.FromErr(err)
220220
}
221221

222-
err = setResourceIdentityNonNamespaced(d, "admissionregistration/v1", "ValidatingWebhookConfiguration", name)
222+
err = setResourceIdentityNonNamespaced(d, "admissionregistration.k8s.io/v1", "ValidatingWebhookConfiguration", name)
223223
if err != nil {
224224
return diag.FromErr(err)
225225
}

0 commit comments

Comments
 (0)