cozystack/pkg
Andrei Kvapil ca29fc855a
[apps] Refactor apiserver to use typed objects and fix UnstructuredList 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
https://github.com/cozystack/cozystack/pull/1630, which was reverted in
https://github.com/cozystack/cozystack/pull/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 <kvapss@gmail.com>
2025-12-01 22:06:23 +01:00
..
apis [dashboard] sync with upstream & enhancements 2025-11-05 18:22:22 +01:00
apiserver [api] Fix representation of dynamic list kinds 2025-11-13 18:04:33 +03:00
cmd/server [api] Fix representation of dynamic list kinds 2025-11-13 18:04:33 +03:00
config Scaffold CozyRD CRD 2025-07-29 17:03:22 +03:00
generated [dashboard] sync with upstream & enhancements 2025-11-05 18:22:22 +01:00
lineage [controller,api] Specify visible secrets 2025-10-01 16:56:52 +03:00
ovnstatus [kubeovn] Implement the KubeOVN plunger 2025-09-11 02:11:58 +03:00
registry [apps] Refactor apiserver to use typed objects and fix UnstructuredList GVK 2025-12-01 22:06:23 +01:00