Skip to content

kustomize: load builtin schemas after reset#1260

Merged
matheuscscp merged 2 commits into
mainfrom
fix-flux2-5981
Jul 9, 2026
Merged

kustomize: load builtin schemas after reset#1260
matheuscscp merged 2 commits into
mainfrom
fix-flux2-5981

Conversation

@matheuscscp

Copy link
Copy Markdown
Member

xref: fluxcd/flux2#5981 (Avoiding Fixes to keep the issue open until a release)

Turns out we dont need to traverse the artifact and look for the openapi field to merge them onto the builtin schemas. We can just load them after the reset.

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
@matheuscscp matheuscscp requested a review from stefanprodan July 8, 2026 16:12
@matheuscscp matheuscscp requested a review from a team as a code owner July 8, 2026 16:12
@matheuscscp matheuscscp added bug Something isn't working area/kustomize Kustomize related issues and pull requests labels Jul 8, 2026
// SecureBuild wraps krusty.MakeKustomizer with the following settings:
func resetOpenAPIWithBuiltins() {
openapi.ResetOpenAPI()
_ = openapi.Schema()

@matheuscscp matheuscscp Jul 8, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This simple openapi.Schema() call is the actual fix for fluxcd/flux2#5972

@stefanprodan stefanprodan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Thanks @matheuscscp 🏅

@matheuscscp matheuscscp merged commit e2882a1 into main Jul 9, 2026
16 checks passed
@matheuscscp matheuscscp deleted the fix-flux2-5981 branch July 9, 2026 13:34
@matheuscscp matheuscscp added the backport:flux/v2.9.x To be backported to flux/v2.9.x label Jul 9, 2026
@fluxcdbot

Copy link
Copy Markdown
Member

Successfully created backport PR for flux/v2.9.x:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/kustomize Kustomize related issues and pull requests backport:flux/v2.9.x To be backported to flux/v2.9.x bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants