Skip to content

Commit 5360549

Browse files
authored
fix(streams-bootstrap): set correct type for secretFilesRefs (#640)
1 parent 8d4e278 commit 5360549

4 files changed

Lines changed: 29 additions & 6 deletions

File tree

docs/docs/schema/defaults.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,7 +2211,7 @@
22112211
"anyOf": [
22122212
{
22132213
"items": {
2214-
"type": "string"
2214+
"type": "object"
22152215
},
22162216
"type": "array"
22172217
},
@@ -3398,7 +3398,7 @@
33983398
"anyOf": [
33993399
{
34003400
"items": {
3401-
"type": "string"
3401+
"type": "object"
34023402
},
34033403
"type": "array"
34043404
},
@@ -4019,7 +4019,7 @@
40194019
"anyOf": [
40204020
{
40214021
"items": {
4022-
"type": "string"
4022+
"type": "object"
40234023
},
40244024
"type": "array"
40254025
},

docs/docs/schema/pipeline.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,7 +1866,7 @@
18661866
"anyOf": [
18671867
{
18681868
"items": {
1869-
"type": "string"
1869+
"type": "object"
18701870
},
18711871
"type": "array"
18721872
},
@@ -3053,7 +3053,7 @@
30533053
"anyOf": [
30543054
{
30553055
"items": {
3056-
"type": "string"
3056+
"type": "object"
30573057
},
30583058
"type": "array"
30593059
},

kpops/components/streams_bootstrap/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class StreamsBootstrapValues(SerializeAsOptionalModel, HelmAppValues):
108108
env: SerializeAsOptional[dict[str, str]] = {}
109109
secrets: SerializeAsOptional[dict[str, str]] = {}
110110
secret_refs: SerializeAsOptional[dict[str, Any]] = {}
111-
secret_files_refs: SerializeAsOptional[list[str]] = []
111+
secret_files_refs: SerializeAsOptional[list[dict[str, Any]]] = []
112112
files: SerializeAsOptional[dict[str, Any]] = {}
113113
java_options: JavaOptions | None = None
114114
pod_annotations: SerializeAsOptional[dict[str, str]] = {}

tests/components/streams_bootstrap/test_streams_bootstrap.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,3 +289,26 @@ def test_node_affinity(self):
289289
}
290290
],
291291
}
292+
293+
def test_secret_files_refs(self):
294+
model = StreamsBootstrap.model_validate(
295+
{
296+
"name": "example-name",
297+
"namespace": "test-namespace",
298+
"values": {
299+
"image": "streamsBootstrap",
300+
"kafka": {
301+
"bootstrapServers": "localhost:9092",
302+
},
303+
"secretFilesRefs": [
304+
{
305+
"name": "foo",
306+
"volume": "bar",
307+
"mountPath": "/some/path/",
308+
"readOnly": True,
309+
}
310+
],
311+
},
312+
},
313+
)
314+
assert model.values.secret_files_refs

0 commit comments

Comments
 (0)