From 0ad7f5e1ab5f51ed4df393c64495cffa7b21899d Mon Sep 17 00:00:00 2001 From: Salomon Popp Date: Wed, 8 Oct 2025 14:22:57 +0200 Subject: [PATCH 1/2] test(streams-bootstrap): create failing test case --- .../test_streams_bootstrap.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/components/streams_bootstrap/test_streams_bootstrap.py b/tests/components/streams_bootstrap/test_streams_bootstrap.py index 1b4eac36d..783c9343d 100644 --- a/tests/components/streams_bootstrap/test_streams_bootstrap.py +++ b/tests/components/streams_bootstrap/test_streams_bootstrap.py @@ -289,3 +289,26 @@ def test_node_affinity(self): } ], } + + def test_secret_files_refs(self): + model = StreamsBootstrap.model_validate( + { + "name": "example-name", + "namespace": "test-namespace", + "values": { + "image": "streamsBootstrap", + "kafka": { + "bootstrapServers": "localhost:9092", + }, + "secretFilesRefs": [ + { + "name": "foo", + "volume": "bar", + "mountPath": "/some/path/", + "readOnly": True, + } + ], + }, + }, + ) + assert model.values.secret_files_refs From c16354e35973d8b7c6d4743c0acb7a3ff6efa416 Mon Sep 17 00:00:00 2001 From: Salomon Popp Date: Wed, 8 Oct 2025 14:59:40 +0200 Subject: [PATCH 2/2] fix(schema): set correct type for secretFilesRefs --- docs/docs/schema/defaults.json | 6 +++--- docs/docs/schema/pipeline.json | 4 ++-- kpops/components/streams_bootstrap/model.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs/schema/defaults.json b/docs/docs/schema/defaults.json index 9c34c0344..7ed023a1d 100644 --- a/docs/docs/schema/defaults.json +++ b/docs/docs/schema/defaults.json @@ -2211,7 +2211,7 @@ "anyOf": [ { "items": { - "type": "string" + "type": "object" }, "type": "array" }, @@ -3398,7 +3398,7 @@ "anyOf": [ { "items": { - "type": "string" + "type": "object" }, "type": "array" }, @@ -4019,7 +4019,7 @@ "anyOf": [ { "items": { - "type": "string" + "type": "object" }, "type": "array" }, diff --git a/docs/docs/schema/pipeline.json b/docs/docs/schema/pipeline.json index e47f31ffe..858163dbb 100644 --- a/docs/docs/schema/pipeline.json +++ b/docs/docs/schema/pipeline.json @@ -1866,7 +1866,7 @@ "anyOf": [ { "items": { - "type": "string" + "type": "object" }, "type": "array" }, @@ -3053,7 +3053,7 @@ "anyOf": [ { "items": { - "type": "string" + "type": "object" }, "type": "array" }, diff --git a/kpops/components/streams_bootstrap/model.py b/kpops/components/streams_bootstrap/model.py index 96f6d473c..58d25cb3a 100644 --- a/kpops/components/streams_bootstrap/model.py +++ b/kpops/components/streams_bootstrap/model.py @@ -108,7 +108,7 @@ class StreamsBootstrapValues(SerializeAsOptionalModel, HelmAppValues): env: SerializeAsOptional[dict[str, str]] = {} secrets: SerializeAsOptional[dict[str, str]] = {} secret_refs: SerializeAsOptional[dict[str, Any]] = {} - secret_files_refs: SerializeAsOptional[list[str]] = [] + secret_files_refs: SerializeAsOptional[list[dict[str, Any]]] = [] files: SerializeAsOptional[dict[str, Any]] = {} java_options: JavaOptions | None = None pod_annotations: SerializeAsOptional[dict[str, str]] = {}