From fc5e6e17dca794b0b0d4ceec26fa468746c32df6 Mon Sep 17 00:00:00 2001 From: Myasnikov Daniil Date: Thu, 14 May 2026 10:33:35 +0500 Subject: [PATCH] fix(platform,dashboard): wire OpenSearch into PaaS bundle and form overrides The opensearch chart, operator chart, ApplicationDefinition and PackageSources have shipped in the repo since the original OpenSearch series, but the PaaS bundle template never references the opensearch-operator / opensearch-application PackageSources. On isp-* variants with bundles.paas.enabled=true, neither the operator nor the ApplicationDefinition is ever installed, so the dashboard catalog has no OpenSearch entry and tenants cannot create opensearches.apps.cozystack.io resources. This patch: - adds opensearch-operator and opensearch-application to the PaaS bundle template, alongside every other DB app - adds OpenSearch to the StorageClass listInput override case in customformsoverride.go (with matching test entry), so the form's storageClass field renders as a StorageClass dropdown in the release-1.3 (legacy openapi-ui) dashboard, matching every other DB app Note: only the bundle half is needed on main (release-1.4) because the new cozystack-ui derives the StorageClass widget client-side from the schema and ignores CustomFormsOverride; this combined patch targets release-1.3 directly. Assisted-By: Claude Signed-off-by: Myasnikov Daniil --- internal/controller/dashboard/customformsoverride.go | 2 +- internal/controller/dashboard/customformsoverride_test.go | 2 +- packages/core/platform/templates/bundles/paas.yaml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/controller/dashboard/customformsoverride.go b/internal/controller/dashboard/customformsoverride.go index 0a20ae712..59e1c8f50 100644 --- a/internal/controller/dashboard/customformsoverride.go +++ b/internal/controller/dashboard/customformsoverride.go @@ -244,7 +244,7 @@ func applyListInputOverrides(schema map[string]any, kind string, openAPIProps ma } case "ClickHouse", "Harbor", "HTTPCache", "Kubernetes", "MariaDB", "MongoDB", - "NATS", "OpenBAO", "Postgres", "Qdrant", "RabbitMQ", "Redis": + "NATS", "OpenBAO", "OpenSearch", "Postgres", "Qdrant", "RabbitMQ", "Redis": specProps := ensureSchemaPath(schema, "spec") specProps["storageClass"] = storageClassListInput() diff --git a/internal/controller/dashboard/customformsoverride_test.go b/internal/controller/dashboard/customformsoverride_test.go index 6a83d62e4..000e1b482 100644 --- a/internal/controller/dashboard/customformsoverride_test.go +++ b/internal/controller/dashboard/customformsoverride_test.go @@ -289,7 +289,7 @@ func TestHiddenDeprecatedFields_UnknownKind(t *testing.T) { func TestApplyListInputOverrides_StorageClassSimple(t *testing.T) { for _, kind := range []string{ "ClickHouse", "Harbor", "HTTPCache", "Kubernetes", "MariaDB", "MongoDB", - "NATS", "OpenBAO", "Postgres", "Qdrant", "RabbitMQ", "Redis", "VMDisk", + "NATS", "OpenBAO", "OpenSearch", "Postgres", "Qdrant", "RabbitMQ", "Redis", "VMDisk", } { t.Run(kind, func(t *testing.T) { schema := map[string]any{} diff --git a/packages/core/platform/templates/bundles/paas.yaml b/packages/core/platform/templates/bundles/paas.yaml index 548543689..157f5b40f 100644 --- a/packages/core/platform/templates/bundles/paas.yaml +++ b/packages/core/platform/templates/bundles/paas.yaml @@ -9,6 +9,7 @@ {{include "cozystack.platform.package.default" (list "cozystack.rabbitmq-operator" $) }} {{include "cozystack.platform.package.default" (list "cozystack.redis-operator" $) }} {{include "cozystack.platform.package.default" (list "cozystack.mongodb-operator" $) }} +{{include "cozystack.platform.package.default" (list "cozystack.opensearch-operator" $) }} {{include "cozystack.platform.package.default" (list "cozystack.clickhouse-application" $) }} {{include "cozystack.platform.package.default" (list "cozystack.foundationdb-application" $) }} {{include "cozystack.platform.package.default" (list "cozystack.harbor-application" $) }} @@ -17,6 +18,7 @@ {{include "cozystack.platform.package.default" (list "cozystack.mongodb-application" $) }} {{include "cozystack.platform.package.default" (list "cozystack.nats-application" $) }} {{include "cozystack.platform.package.default" (list "cozystack.openbao-application" $) }} +{{include "cozystack.platform.package.default" (list "cozystack.opensearch-application" $) }} {{include "cozystack.platform.package.default" (list "cozystack.postgres-application" $) }} {{include "cozystack.platform.package.default" (list "cozystack.qdrant-application" $) }} {{include "cozystack.platform.package.default" (list "cozystack.rabbitmq-application" $) }}