Skip to content

Commit

Permalink
Merge pull request #369 from werf/fix/ignore-error-additional-propert…
Browse files Browse the repository at this point in the history
…y-werf-is-not-allowed

fix: ignore error "Additional property werf is not allowed"
  • Loading branch information
ilya-lesikov authored Dec 5, 2024
2 parents ae1f8da + b4c365f commit 108ebc6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/chartutil/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package chartutil
import (
"fmt"
"io"
"log"
"os"
"strings"

Expand Down Expand Up @@ -158,7 +159,12 @@ func ToRenderValues(chrt *chart.Chart, chrtVals map[string]interface{}, options

if err := ValidateAgainstSchema(chrt, vals); err != nil {
errFmt := "values don't meet the specifications of the schema(s) in the following chart(s):\n%s"
return top, fmt.Errorf(errFmt, err.Error())

if strings.Contains(err.Error(), "(root): Additional property werf is not allowed") {
log.Printf("Warning: %s", fmt.Sprintf(errFmt, err.Error()))
} else {
return top, fmt.Errorf(errFmt, err.Error())
}
}

top["Values"] = vals
Expand Down

0 comments on commit 108ebc6

Please sign in to comment.