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 does the following to improve deletion failure handling:
- In an UninstallRelease operation, the release is marked DELETED
as soon as the basic checks are passed. This resolves 1508. I filed a
followup issue for doing this even better when we can modify protos
again.
- If a YAML manifest fails to parse, the error messages now suggests
that the record is corrupt, and the resources must be manually
deleted.
- If a resource is missing during deletion, the error messages now make
it clear that an object was skipped, but that the deletion continued.
Closes#1508
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
Currently, delete returns an error if a resource is not found.
That is a bit confusing because if you delete something that
is not found, the end state is not really an error. The end
state is what you wanted to do in the first place. This type
of error is not propogated from the kube client but it is logged
in tiller. We could also change this to keep returning errors
(even the not found) and filter it out in the release server.
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