banzaicloud / terraform-provider-k8s

Kubernetes Terraform provider with support for raw manifests
https://registry.terraform.io/providers/banzaicloud/k8s
MIT License
135 stars 30 forks source link

Patch instead of update #67

Closed pepov closed 3 years ago

pepov commented 3 years ago
Q A
Bug fix? yes
New feature? no
API breaks? no
Deprecations? no
Fixes #66
License Apache 2.0

What's in this PR?

Uses three way merge patch instead of updating the resource as a whole. Avoids issues with fields that shouldn't be set in the request and causes problems like spec.clusterIP for service resources.

Why?

Additional context

Testing was done manually by rerunning existing integration tests and modifying terraform configuration between them.

Checklist