feat(k8s-export-openapi): add tests and update removal logic for OpenAPI fields#4649
Open
manumathon wants to merge 1 commit into
Open
feat(k8s-export-openapi): add tests and update removal logic for OpenAPI fields#4649manumathon wants to merge 1 commit into
manumathon wants to merge 1 commit into
Conversation
…API fields - Introduced a new test file for the k8s-export-openapi script to validate the removal of specific fields from OpenAPI definitions. - Updated the `removeFields` function to retain certain keys (`x-kubernetes-patch-strategy`, `x-kubernetes-patch-merge-key`) while removing others. - Modified the Makefile to include the new test in the build process. - Enhanced YAML templates to include `x-kubernetes-patch-strategy` and `x-kubernetes-patch-merge-key` where necessary. This change improves the testing coverage and ensures compliance with Kubernetes API specifications. Signed-off-by: Manu <kiratcodes99@gmail.com>
Member
|
/gcbrun Neat! Let's take it for a spin! |
Collaborator
|
Build Succeeded 🥳 Build Id: 0f8773f1-c47f-4351-b523-aaddc44d9420 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
markmandel
reviewed
Jul 19, 2026
| "testing" | ||
| ) | ||
|
|
||
| func TestRemoveFieldsKeepsPatchKeys(t *testing.T) { |
| ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name. | ||
|
|
||
| This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. | ||
| This is a stable field but requires that the DynamicResourceAllocation feature gate is enabled. |
Member
There was a problem hiding this comment.
Which version of K8s did you generate this against? I'm wondering if it's further forward than what we have in our supported matrix.
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.
…
What type of PR is this?
/kind bug
What this PR does / Why we need it:
removeFieldsfunction to retain certain keys (x-kubernetes-patch-strategy,x-kubernetes-patch-merge-key) while removing others.x-kubernetes-patch-strategyandx-kubernetes-patch-merge-keywhere necessary.This change improves the testing coverage and ensures compliance with Kubernetes API specifications.
Which issue(s) this PR fixes:
Closes #3112
Did you use AI tools in preparing this PR?:
Yes, I used AI tools to investigate the issue, but I implemented the fix myself. I also used AI to help draft GitHub commit msg.
Special notes for your reviewer: