Skip to content

[module-sdk] fix: preserve crd vendor extensions#122

Merged
ldmonster merged 3 commits into
mainfrom
fix/crd-installer-preserve-vendor-extensions
Jul 20, 2026
Merged

[module-sdk] fix: preserve crd vendor extensions#122
ldmonster merged 3 commits into
mainfrom
fix/crd-installer-preserve-vendor-extensions

Conversation

@fuldaxxx

@fuldaxxx fuldaxxx commented Jul 16, 2026

Copy link
Copy Markdown
Member

Description

Apply CRDs as unstructured (verbatim) instead of decoding them into the typed
apiextensionsv1.CustomResourceDefinition before writing. The typed struct is
now used only to read metadata (names/versions/GVK, storedVersions); the diff
runs on the lossless unstructured .spec, the in-cluster spec.conversion is
preserved, and a regression test covers a vendor extension surviving the install
path.

Why do we need it, and what problem does it solve?

The installer decoded CRDs into a typed struct that has no catch-all for vendor
OpenAPI extensions, so any non-standard x-* field
(x-kubernetes-sensitive-data, x-ui-*, x-kubernetes-patch-strategy, …) was
silently dropped before apply. And since the read-back path was also typed, the
diff never saw the difference, so the update never fired and re-runs didn't
self-heal. The installer should transport the CRD as-is and leave schema
validation to the API server.

Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
@fuldaxxx
fuldaxxx requested a review from ldmonster July 16, 2026 15:09
@fuldaxxx fuldaxxx self-assigned this Jul 16, 2026
@fuldaxxx fuldaxxx added bug Something isn't working go Pull requests that update go code labels Jul 16, 2026
@fuldaxxx fuldaxxx changed the title [module-sdk fix: preserve crd vendor extensions [module-sdk] fix: preserve crd vendor extensions Jul 16, 2026
fuldaxxx added 2 commits July 20, 2026 04:24
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
@fuldaxxx
fuldaxxx requested a review from ipaqsa July 20, 2026 07:58
@fuldaxxx
fuldaxxx marked this pull request as ready for review July 20, 2026 07:58
@ldmonster
ldmonster merged commit 69f99d0 into main Jul 20, 2026
26 checks passed
@ldmonster
ldmonster deleted the fix/crd-installer-preserve-vendor-extensions branch July 20, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants