Skip to content

[Backport release-0.38] [apps] Refactor apiserver to use typed objects and fix UnstructuredList GVK - #1709

Merged
Andrei Kvapil (kvaps) merged 1 commit into
release-0.38from
backport-1679-to-release-0.38
Dec 10, 2025
Merged

Andrei Kvapil (kvaps) merged 1 commit into
release-0.38from
backport-1679-to-release-0.38

Conversation

@github-actions

Copy link
Copy Markdown

Description

Backport of #1679 to release-0.38.

…st GVK

This commit refactors the apiserver REST handlers to use typed objects
(appsv1alpha1.Application) instead of unstructured.Unstructured, eliminating
the need for runtime conversions and simplifying the codebase.

Additionally, it fixes an issue where UnstructuredList objects were using
the first registered kind from typeToGVK instead of the kind from the
object's field when multiple kinds are registered with the same Go type.

This is a more comprehensive fix for the problem addressed in
#1630, which was reverted in
#1677.

The fix includes the upstream fix from kubernetes/kubernetes#135537,
which enables short-circuit path for UnstructuredList similar to regular
Unstructured objects, using GVK from the object field instead of
typeToGVK.

Changes:
- Refactored rest.go handlers to use typed Application objects
- Removed unstructured.Unstructured conversions
- Fixed UnstructuredList GVK handling
- Updated dependencies in go.mod/go.sum
- Added e2e test for OpenAPI validation
- Updated Dockerfile

Signed-off-by: Andrei Kvapil <[email protected]>
(cherry picked from commit ca29fc8)
@coderabbitai

coderabbitai Bot commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@dosubot dosubot Bot added the size/L This PR changes 100-499 lines, ignoring generated files label Dec 10, 2025
@kvaps
Andrei Kvapil (kvaps) merged commit a8bd179 into release-0.38 Dec 10, 2025
4 checks passed
@kvaps
Andrei Kvapil (kvaps) deleted the backport-1679-to-release-0.38 branch December 10, 2025 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant