mattermost / mattermost-helm

Mattermost Helm charts for Kubernetes
Apache License 2.0
165 stars 147 forks source link

[GH-326] [GH-327] Add tests to detect templating errors in more common situations and fix #328

Open andrewodri opened 2 years ago

andrewodri commented 2 years ago

Summary

This PR adds tests to help identify templating errors by running helm template silently, and failing on errors. This also allows sensible default values to be defined (e.g. ingress.enabled=true, presistence.enabled=true and autoscaling.enabled=true) for more comprehensive coverage.

I attempted to implement this by using the latest version of chart-testing, however, the configuration options don't appear to work, and it could not effectively identify errors without supplying new values.yaml files.

This PR also fixes ingress template errors in the mattermost-chaos-engine and mattermost-grafana chart recently introduced by #322.

Ticket Link

Fixes #326 and #327

mattermod commented 2 years ago

The files .circleci/config.yml, tests/e2e-kind.sh, tests/validate-charts.sh are in the blocklist for external contributors. Hence, these changes are not tested by the CI pipeline active until the build is re-triggered by a core committer or the PR is merged. Please be careful when reviewing it. /cc @mattermost/core-security @mattermost/core-build-engineers

mattermod commented 2 years ago

Hello @andrewodri,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

mattermod commented 2 years ago

This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!