Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

☸️ Lint Helm Chart Changes #1677

Closed
9 tasks done
jasonBirchall opened this issue Feb 3, 2025 · 5 comments
Closed
9 tasks done

☸️ Lint Helm Chart Changes #1677

jasonBirchall opened this issue Feb 3, 2025 · 5 comments
Assignees

Comments

@jasonBirchall
Copy link
Collaborator

jasonBirchall commented Feb 3, 2025

User Need

As a software engineer making changes to our Helm charts repository
I want to lint changes automatically
so that I can feel confident my change will not break Helm’s rendering engine

Functional Requirements (What):

  • Configure an automated linting process (e.g., using helm lint) to run on every pull request before merge
  • Provide clear feedback (error messages/logs) to the developer when lint checks fail

Non-Functional Requirements (How):

  • The lint check should run quickly (e.g., under two minutes) so as not to delay development workflows
  • The lint check process should be secure and not expose sensitive credentials or data
  • Lint logs and reports should be easily accessible for debugging and auditing

Acceptance Criteria:

  • Helm lint runs automatically on all pull requests involving Helm chart changes
  • If linting fails, the pull request is blocked from merging, and the developer is notified of the failure reasons
  • Clear instructions or links to documentation are provided to help developers resolve linting issues
  • Successful lint checks allow the pull request to be merged

Notes:

  • We will use the official Helm documentation on linting as a basis for this process.
  • This work is being conducted in the repository for govuk-helm-charts.
@jasonBirchall
Copy link
Collaborator Author

This already exists, but mustn't be working.

@kentsanggds kentsanggds self-assigned this Feb 6, 2025
@kentsanggds
Copy link
Contributor

This already appears to do some linting on the charts in govuk-helm-charts https://github.com/alphagov/govuk-helm-charts/blob/main/.github/workflows/ci.yml#L19-L25

@kentsanggds
Copy link
Contributor

This was the PR that got through the checks but shouldn't have - alphagov/govuk-helm-charts#2964

@kentsanggds
Copy link
Contributor

Using this branch to test whether the lint can pick up the issue - alphagov/govuk-helm-charts@main...fix-chart-linting

Also reading this stackoverflow thread - https://stackoverflow.com/questions/48665209/validating-helm-chart-content

Might be worth exploring helm chart unittests - https://github.com/quintush/helm-unittest

@kentsanggds
Copy link
Contributor

PR up for review alphagov/govuk-helm-charts#2985

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants