diff --git a/lib/kubeclient/common.rb b/lib/kubeclient/common.rb index 8b97e75c..19472126 100644 --- a/lib/kubeclient/common.rb +++ b/lib/kubeclient/common.rb @@ -368,15 +368,11 @@ def delete_entity(resource_name, name, namespace = nil, delete_options: {}) def create_entity(entity_type, resource_name, entity_config) # Duplicate the entity_config to a hash so that when we assign # kind and apiVersion, this does not mutate original entity_config obj. + # TODO: skip? hash = entity_config.to_hash ns_prefix = build_namespace_prefix(hash[:metadata][:namespace]) - # TODO: temporary solution to add "kind" and apiVersion to request - # until this issue is solved - # https://github.com/GoogleCloudPlatform/kubernetes/issues/6439 - hash[:kind] = entity_type - hash[:apiVersion] = @api_group + @api_version response = handle_exception do rest_client[ns_prefix + resource_name] .post(hash.to_json, { 'Content-Type' => 'application/json' }.merge(@headers))