cozystack/hack
Andrei Kvapil 1491535b35 [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>
(cherry picked from commit ca29fc855a)
2025-12-10 12:22:57 +00:00
..
e2e-apps [kubernetes] Make worker version configurable 2025-11-08 15:25:18 +03:00
boilerplate.go.txt Introduce cozystack-controller (#560) 2025-01-09 12:24:51 +01:00
cdi_golden_image_create.sh [virtual-machine] Refactor golden images 2025-07-03 13:33:44 +03:00
check-optional-repos.sh Add AI-agent for changelogs generation 2025-11-26 20:18:43 +01:00
collect-images.sh [dx] Refactor collect-images functionality 2025-07-03 14:26:56 +03:00
cozyreport.sh [ci] Fix garbage output in cozyreport 2025-09-04 11:03:08 +03:00
cozytest.sh [tests] Add more space for e2e tests 2025-08-11 13:04:00 +03:00
download-dashboards.sh [monitoring] add seaweedfs monitoring 2025-07-30 15:17:46 +03:00
e2e-install-cozystack.bats [cozystack-controller] improve API tests 2025-11-07 22:57:28 +01:00
e2e-prepare-cluster.bats [core] rm talos lldp extension 2025-11-04 12:21:23 +03:00
e2e-test-openapi.bats [apps] Refactor apiserver to use typed objects and fix UnstructuredList GVK 2025-12-10 12:22:57 +00:00
helm-unit-tests.sh [ci,dx] Add unit tests for cozy-lib 2025-11-19 17:56:17 +03:00
pre-checks.sh Fix osx grep have no -P flag (#438) 2024-10-21 11:59:56 +02:00
update-codegen.sh [installer] Even more rigorous migration 2025-10-09 21:34:14 +03:00
update-crd.sh [api,platform] Decouple CozyRDs from API HR 2025-10-08 16:18:47 +03:00
upload-assets.sh Upload kernel and initramfs to release assets 2025-04-08 23:27:37 +02:00
upload-releasenotes.sh Add AI-agent for changelogs generation 2025-11-26 20:18:43 +01:00