Upgrade gatekeeper function to Go 1.26.3 with latest dependencies#1252
Open
aravindtga wants to merge 1 commit into
Open
Upgrade gatekeeper function to Go 1.26.3 with latest dependencies#1252aravindtga wants to merge 1 commit into
aravindtga wants to merge 1 commit into
Conversation
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
✅ Deploy Preview for krm-function-catalog canceled.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the Gatekeeper Go KRM function to Go 1.26.3 and refreshes key dependencies (Gatekeeper v3, kyaml, Kubernetes libs), including updating the function result model and golden test/expected outputs to match the newer kyaml/framework behavior.
Changes:
- Bump
functions/go/gatekeeperto Go 1.26.3 and update dependencies (notablygithub.com/open-policy-agent/gatekeeper/v3andsigs.k8s.io/kustomize/kyaml). - Refactor Gatekeeper validation output to use
framework.Resultsand its built-in sorting. - Update example policies and golden E2E fixtures to reflect new schema/serialization and message formatting.
Reviewed changes
Copilot reviewed 12 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| functions/go/gatekeeper/validate.go | Switch validation parsing to Gatekeeper v3 gator results and emit framework.Results (includes sorting). |
| functions/go/gatekeeper/validate_test.go | Update sorting test to use framework.Results.Sort() and new pointer/value field shapes. |
| functions/go/gatekeeper/main.go | Migrate from resourceList.Result to resourceList.Results and propagate framework.Results on error. |
| functions/go/gatekeeper/go.mod | Upgrade Go version + dependency set for the Gatekeeper function module. |
| functions/go/gatekeeper/go.sum | Regenerated checksums after dependency upgrade. |
| functions/go/gatekeeper/tests/v1beta1-template/.expected/results.yaml | Update expected stderr formatting to match new output. |
| functions/go/gatekeeper/tests/v1beta1-template/.expected/diff.patch | Update golden patch output to match new formatting. |
| functions/go/gatekeeper/tests/jsonflag/.expected/diff.patch | Update expected JSON structure for results (now array-style). |
| functions/go/gatekeeper/tests/inputoutputflags/resources/resources.yaml | Reformat resource YAML (structure equivalent) for updated expectations. |
| functions/go/gatekeeper/tests/inputoutputflags/.expected/diff.patch | Update golden output for results structure (list-style). |
| examples/gatekeeper-warning-only/policy.yaml | Adjust OpenAPI schema to include type: object under openAPIV3Schema. |
| examples/gatekeeper-invalid-configmap/policy.yaml | Adjust OpenAPI schema to include type: object under openAPIV3Schema. |
| examples/gatekeeper-invalid-configmap/.expected/results.yaml | Update expected stderr formatting to match new output. |
| examples/gatekeeper-invalid-configmap/.expected/diff.patch | Update golden patch output to match new formatting. |
| examples/gatekeeper-imperative/policy.yaml | Adjust OpenAPI schema to include type: object under openAPIV3Schema. |
| examples/gatekeeper-imperative/.expected/results.yaml | Update expected stderr formatting to match new output. |
| examples/gatekeeper-disallow-root-user/.expected/results.yaml | Update expected stderr formatting to match new output. |
| examples/gatekeeper-disallow-root-user/.expected/diff.patch | Update golden patch output to match new formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
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.

Upgrade the gatekeeper KRM function to Go 1.26.3 and update all dependencies to their latest compatible versions, aligning with the rest of the catalog.
Changes
Dependency upgrades
Testing
go build ./...go test ./...go vet ./...AI usage disclosure