* Continue deleting objects when one fails to minimize the risk of an
upgrade ending in an unrecoverable state
* Exclude failed deleted object from the returned result set
Signed-off-by: Adam Reese <adam@reese.io>
This changes most of the KubeClient interface to only ever build objects once and
then pass in everything as lists of resources. As a consequence, we needed to refactor
several of the actions. I took the opportunity to refactor out some duplicated
code while I was in the same area
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
This fixes an issue where resources that hardcode the metadata.namespace parameter cannot be installed.
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
* move the main interface to it's own file
* removed summarizeKeptManifests() which was the last place kube.Get()
was called
* when polling for hooks, use external types
* refactor out legacyschema
* refactor detecting selectors from object
* refactor creating test client
Signed-off-by: Adam Reese <adam@reese.io>
This fixes a bug in which 'helm status' fails if any of the expected
resources are missing in Kubernetes. Now it prints a list of missing
resources at the end of the status report.
Closes#2118
When manifests do not change, they didn't get populated with the
latest label info from the API server and then panic'd. This resolves
that bug
Closes#2043
* This is a simple mvp which processes a test definition with the
hook annotation for test when you run `helm test [release]`
* helm client cmd, proto def, tiller logic
Adds validation against the swagger schema.
Example error:
Error: release telling-wildebeest failed: error validating "": error
validating data: expected type int, for field
spec.template.spec.containers[0].ports[0].containerPort, got string
Current error:
unable to decode "": [pos 177]: json: expect char '"' but got char 'n'"'
This feature has been disabled in the past because simply enabling the
feature causes the Kubernetes library to make requests to a server.
Thus, running any tests that use the 'pkg/kube' library has required
running a kube API server.
This patch makes it possible to selectively activate 3rdParty API
support, and then disables that support during testing.
Future versions of the Kubernetes library appear to make it easier to
configure and mock this behavior, so this is most likely a stop-gap
measure. (Famous last words.)
Closes#1472
This commit adds an Update function to the client.
The Update function takes in the modified manifests and
the original manifests. It then iterates through the modified
objects, creates objects not found in kubernetes, and updates
objects that exists but have been modified. Finally, it
iterates through the original resources and checks to see if
they have been deleted in the modified configuration and then
proceeds to delete them. #690