feat(chartvalidator): api versions support#11
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for configurable Kubernetes API versions and version specification for chart validation. It introduces two new command-line flags: --api-versions for passing additional Kubernetes API versions to Helm, and --k8s-version for specifying the Kubernetes version used in manifest validation and chart rendering.
Key Changes
- Added
--api-versionsand--k8s-versioncommand-line flags to bothrun-checksandrender-onlycommands - Integrated API versions into Helm chart rendering with
--api-versionsand--kube-versionflags - Enhanced kubeconform validation with
-kubernetes-versionand-skip CustomResourceDefinitionflags - Improved schema path handling with absolute paths and multiple schema location patterns
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| chartvalidator/checker/main.go | Added command-line flags for API versions and Kubernetes version, updated function signatures to pass these parameters through the execution pipeline |
| chartvalidator/checker/engine_chart_rendering.go | Implemented API versions support in Helm rendering by appending --api-versions flags and --kube-version to helm template commands |
| chartvalidator/checker/engine_manifest_validation.go | Enhanced kubeconform validation with Kubernetes version specification, CRD skipping, and improved schema path handling with absolute paths |
| chartvalidator/checker/engine_app_checker.go | Updated engine constructor to accept and propagate API versions, added schema directory initialization with absolute path resolution |
| chartvalidator/checker/engine_chart_rendering_test.go | Updated test expectations to include new --kube-version and --api-versions flags in helm commands |
| chartvalidator/checker/engine_manifest_validation_test.go | Modified test assertions to verify new kubeconform flags including -skip CustomResourceDefinition and -kubernetes-version |
| chartvalidator/checker/types.go | Aligned struct field formatting for consistency |
| chartvalidator/checker/appsets.go | Minor formatting cleanup (trailing newline) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b29d09b to
4646d80
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.