From 6771261c49ebc5086b7f137cdb5088a09e5d9ac7 Mon Sep 17 00:00:00 2001 From: Jochen Seeber Date: Wed, 12 Jan 2022 17:09:02 +0100 Subject: [PATCH] Fix apply method to correctly serialize entity --- lib/kubeclient.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kubeclient.rb b/lib/kubeclient.rb index c82420ea..6e49d765 100644 --- a/lib/kubeclient.rb +++ b/lib/kubeclient.rb @@ -497,7 +497,7 @@ def apply_entity(resource_name, resource, field_manager:, force: true) response = handle_exception do faraday_client.patch( "#{ns_prefix}#{resource_name}/#{name}", - resource.to_json, + resource.to_h.to_json, { 'Content-Type' => 'application/apply-patch+yaml' }.merge(@headers) ) end