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

Add validation using kubeconform #449

Merged

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Jan 29, 2024

Motivation

  • helm lint doesn't validate extra keys in the Kubernetes objects which could be a sign of typos or invalid indentation.
  • kubeconform provides a proper solution for that.

kubeconform validation will catch helm install unknown field warnings such as this:

W0129 15:44:25.424470   81383 warnings.go:70] unknown field "spec.template.spec.initContainers[1].requests"

this happened in a recent PR when the indentation was incorrect.

Modifications

  • Add kubeconform step to the "chart-testing lint" build job in the CI workflow

Verifying this change

  • Make sure that the change passes the CI checks.

@lhotari lhotari force-pushed the lh-add-kubeconform-check-to-detect-invalid-keys branch 3 times, most recently from f9c5911 to 0cd0241 Compare January 29, 2024 15:07
@lhotari lhotari force-pushed the lh-add-kubeconform-check-to-detect-invalid-keys branch from 0cd0241 to 8f4e30f Compare January 29, 2024 15:09
@lhotari
Copy link
Member Author

lhotari commented Jan 29, 2024

@frankjkelly @Mortom123 Please review

@Mortom123
Copy link
Contributor

LGTM. Wonder what PR you mean... :D

@lhotari
Copy link
Member Author

lhotari commented Jan 29, 2024

LGTM. Wonder what PR you mean... :D

@Mortom123 this particular invalid indentation: #448 (comment) . It didn't get caught by validation. After adding kubeconform validation, it would be detected.

@lhotari lhotari merged commit 24b80c1 into apache:master Jan 31, 2024
28 checks passed
Copy link
Contributor

@frankjkelly frankjkelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool - sorry I missed giving feedback on this

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

Successfully merging this pull request may close these issues.

3 participants