helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Add checks for best-practices

Open tongpu opened this issue 5 years ago • 6 comments

Is your feature request related to a problem? Please describe. We've learned about certain things that we should look out for over time and we should add some checks to catch those. I'm currently aware of of the issue that ArgoCD doesn't like trailing slashes for .repoURL (#141) and that our best practices are to explicitly configure a name for each chart in our *-apps charts (#136).

Describe the solution you'd like Simply yamllint check to verify the correct configuration of values.yaml in our *-apps charts.

Describe alternatives you've considered Not applicable.

Affected chart *-apps charts mostly.

tongpu avatar Dec 18 '20 09:12 tongpu

I was thinking about writing a own rule set for this for yamllint, but it looks like implementing custom rules in yamllint isn't as easy as doing it for ansible-lint https://github.com/adrienverge/yamllint/issues/123

Now looking into ct lint perhaps we can do it there somehow

https://github.com/helm/chart-testing/blob/master/doc/ct_lint.md

eyenx avatar Dec 23 '20 12:12 eyenx

yeah ct lint isn't gonna help, as it only checks the Chart.yaml

eyenx avatar Dec 23 '20 12:12 eyenx

we could use yamale, which is used internally by ct lint, with a custom schema for our values.yaml.

eyenx avatar Dec 23 '20 13:12 eyenx

I've recently been thinking of things like helm-unittest and hcunit lately. For the *-apps charts it might even be worth it to update the ct deployment to also include an actual argo cd based deployment but I'm not sure how easy that would be to implement.

hairmare avatar Jan 11 '21 08:01 hairmare

For -app charts argo cd headless might be the way to test complete installs, i'm not sure how far along the project is tho.

hairmare avatar Jan 26 '22 10:01 hairmare

  • #548

hairmare avatar Feb 07 '22 13:02 hairmare