auto-kubernetes-client
Advanced tools
Comparing version 0.3.0 to 0.3.1
{ | ||
"name": "auto-kubernetes-client", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "NodeJS Kubernetes Client with automatic API discoveryEdit", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -51,5 +51,5 @@ # auto-kubernetes-client [](https://travis-ci.org/Collaborne/auto-kubernetes-client) [](https://greenkeeper.io/) | ||
Single resources offer resource methods `get`, `update`, `patch` and `delete`. | ||
- Resource methods typically have the signature `method(qs = {})`, where `qs` is a hash for additional query parameters, | ||
- Resource methods typically have the signature `method([qs])`, where `qs` is a hash for additional query parameters, | ||
and return a promise for the parsed response entity. | ||
- The `watch` resource method has the signature `watch()`, and returns an object stream for the observed changes. | ||
- The `watch` resource method has the signature `watch([resourceVersion[, qs]])`, and returns an object stream for the observed changes. | ||
Each object has a `type` field ('ADDED', 'DELETED', 'MODIFIED'), and the actual object that was modified. | ||
@@ -56,0 +56,0 @@ |
@@ -173,3 +173,4 @@ 'use strict'; | ||
update: function(object, qs = {}) { | ||
return k8sRequest(resourcePath, { qs, method: 'PUT', body: object }); | ||
const updateObject = Object.assign({ metadata: { name }}, object); | ||
return k8sRequest(resourcePath, { qs, method: 'PUT', body: updateObject }); | ||
}, | ||
@@ -176,0 +177,0 @@ |
28100
301