Merge pull request #5760 from mortent/revertValidationFix

fix(helm): Disable schema validation for manifests
pull/5819/head
Matthew Fisher 6 years ago committed by GitHub
commit af0bb6d26b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -157,13 +157,16 @@ func (c *Client) BuildUnstructured(namespace string, reader io.Reader) (Result,
} }
// Validate reads Kubernetes manifests and validates the content. // Validate reads Kubernetes manifests and validates the content.
//
// This function does not actually do schema validation of manifests. Adding
// validation now breaks existing clients of helm: https://github.com/helm/helm/issues/5750
func (c *Client) Validate(namespace string, reader io.Reader) error { func (c *Client) Validate(namespace string, reader io.Reader) error {
_, err := c.NewBuilder(). _, err := c.NewBuilder().
Unstructured(). Unstructured().
ContinueOnError(). ContinueOnError().
NamespaceParam(namespace). NamespaceParam(namespace).
DefaultNamespace(). DefaultNamespace().
Schema(c.validator()). // Schema(c.validator()). // No schema validation
Stream(reader, ""). Stream(reader, "").
Flatten(). Flatten().
Do().Infos() Do().Infos()

Loading…
Cancel
Save