Giter Club home page Giter Club logo

Comments (3)

bkimbrough88 avatar bkimbrough88 commented on June 2, 2024 3

After doing more digging I found that the solution here is to use a *-values.yaml file in the ci directory of my chart and the linter will respect those values. See helm/chart-testing#161 (comment)

from chart-testing-action.

bkimbrough88 avatar bkimbrough88 commented on June 2, 2024

I thought that you could do this by passing the --set option to the helm-extra-args setting in your config file. However the linter still fails saying that the chart is missing the required values.

helm-extra-args: >-
  --set component=foo
  --set global.application=fee
  --set global.dockerRepo=fi
  --set global.environment=fo
  --set global.version=fum

I can see that the action is respecting my config:

HelmExtraArgs: --set component=foo --set global.application=fee --set global.dockerRepo=fi --set global.environment=fo --set global.version=fum

However when this runs the lint command, it is still failing to find these variables and fails validation:

==> Linting charts/webservice
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/deployment.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 9: found character that cannot start any token
[ERROR] templates/service.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 8: found character that cannot start any token

engine.go:159: [INFO] Missing required value: global.application must be defined
engine.go:159: [INFO] Missing required value: component must be defined
engine.go:159: [INFO] Missing required value: global.dockerRepo must be defined
engine.go:159: [INFO] Missing required value: global.environment must be defined
engine.go:159: [INFO] Missing required value: global.version must be defined
Error: Error linting charts: Error processing charts
Error: 1 chart(s) linted, 1 chart(s) failed

I get the same error if I do not set these values for the linter when running helm lint locally, but they don't appear to be used.

from chart-testing-action.

unguiculus avatar unguiculus commented on June 2, 2024

Closing this now. Using values files in the ci folder is the correct solution.

from chart-testing-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.