Skip to content

Commit d2f7ce1

Browse files
authored
feat(streams-bootstrap): set default Kafka brokers from config (#637)
1 parent 14b41e4 commit d2f7ce1

13 files changed

Lines changed: 262 additions & 144 deletions

File tree

docs/docs/resources/pipeline-components/pipeline.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@
277277
# https://github.com/bakdata/streams-bootstrap/tree/master/charts/producer-app
278278
values: # required
279279
kafka: # required, producer-app-specific
280-
bootstrapServers: ${config.kafka_brokers} # required
280+
bootstrapServers: ${config.kafka_brokers}
281281
schemaRegistryUrl: ${config.schema_registry.url}
282282
outputTopic: output_topic
283283
labeledOutputTopics:
@@ -349,7 +349,7 @@
349349
values: # required
350350
# streams-bootstrap kafka section
351351
kafka: # required, streams-app-specific
352-
bootstrapServers: ${config.kafka_brokers} # required
352+
bootstrapServers: ${config.kafka_brokers}
353353
schemaRegistryUrl: ${config.schema_registry.url}
354354
applicationId: example-id
355355
inputTopics:

docs/docs/resources/pipeline-components/producer-app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# https://github.com/bakdata/streams-bootstrap/tree/master/charts/producer-app
3333
values: # required
3434
kafka: # required, producer-app-specific
35-
bootstrapServers: ${config.kafka_brokers} # required
35+
bootstrapServers: ${config.kafka_brokers}
3636
schemaRegistryUrl: ${config.schema_registry.url}
3737
outputTopic: output_topic
3838
labeledOutputTopics:

docs/docs/resources/pipeline-components/sections/values-producer-app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/bakdata/streams-bootstrap/tree/master/charts/producer-app
33
values: # required
44
kafka: # required, producer-app-specific
5-
bootstrapServers: ${config.kafka_brokers} # required
5+
bootstrapServers: ${config.kafka_brokers}
66
schemaRegistryUrl: ${config.schema_registry.url}
77
outputTopic: output_topic
88
labeledOutputTopics:

docs/docs/resources/pipeline-components/sections/values-streams-app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
values: # required
55
# streams-bootstrap kafka section
66
kafka: # required, streams-app-specific
7-
bootstrapServers: ${config.kafka_brokers} # required
7+
bootstrapServers: ${config.kafka_brokers}
88
schemaRegistryUrl: ${config.schema_registry.url}
99
applicationId: example-id
1010
inputTopics:

docs/docs/resources/pipeline-components/streams-app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
values: # required
5252
# streams-bootstrap kafka section
5353
kafka: # required, streams-app-specific
54-
bootstrapServers: ${config.kafka_brokers} # required
54+
bootstrapServers: ${config.kafka_brokers}
5555
schemaRegistryUrl: ${config.schema_registry.url}
5656
applicationId: example-id
5757
inputTopics:

docs/docs/resources/pipeline-defaults/defaults-producer-app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ producer-app:
1010
# https://github.com/bakdata/streams-bootstrap/tree/master/charts/producer-app
1111
values: # required
1212
kafka: # required, producer-app-specific
13-
bootstrapServers: ${config.kafka_brokers} # required
13+
bootstrapServers: ${config.kafka_brokers}
1414
schemaRegistryUrl: ${config.schema_registry.url}
1515
outputTopic: output_topic
1616
labeledOutputTopics:

docs/docs/resources/pipeline-defaults/defaults-streams-app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ streams-app:
99
values: # required
1010
# streams-bootstrap kafka section
1111
kafka: # required, streams-app-specific
12-
bootstrapServers: ${config.kafka_brokers} # required
12+
bootstrapServers: ${config.kafka_brokers}
1313
schemaRegistryUrl: ${config.schema_registry.url}
1414
applicationId: example-id
1515
inputTopics:

docs/docs/resources/pipeline-defaults/defaults.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ producer-app:
196196
# https://github.com/bakdata/streams-bootstrap/tree/master/charts/producer-app
197197
values: # required
198198
kafka: # required, producer-app-specific
199-
bootstrapServers: ${config.kafka_brokers} # required
199+
bootstrapServers: ${config.kafka_brokers}
200200
schemaRegistryUrl: ${config.schema_registry.url}
201201
outputTopic: output_topic
202202
labeledOutputTopics:
@@ -215,7 +215,7 @@ streams-app:
215215
values: # required
216216
# streams-bootstrap kafka section
217217
kafka: # required, streams-app-specific
218-
bootstrapServers: ${config.kafka_brokers} # required
218+
bootstrapServers: ${config.kafka_brokers}
219219
schemaRegistryUrl: ${config.schema_registry.url}
220220
applicationId: example-id
221221
inputTopics:

docs/docs/schema/defaults.json

Lines changed: 108 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -610,18 +610,26 @@
610610
"description": "Kafka Streams config.",
611611
"properties": {
612612
"bootstrapServers": {
613+
"default": "${config.kafka_brokers}",
613614
"description": "Brokers",
614615
"title": "Bootstrapservers",
615616
"type": "string"
616617
},
617618
"labeledOutputTopics": {
618-
"additionalProperties": {
619-
"type": "string"
620-
},
619+
"anyOf": [
620+
{
621+
"additionalProperties": {
622+
"type": "string"
623+
},
624+
"type": "object"
625+
},
626+
{
627+
"type": "null"
628+
}
629+
],
621630
"default": {},
622631
"description": "Extra output topics",
623-
"title": "Labeledoutputtopics",
624-
"type": "object"
632+
"title": "Labeledoutputtopics"
625633
},
626634
"outputTopic": {
627635
"anyOf": [
@@ -649,9 +657,6 @@
649657
"title": "Schema Registry Url"
650658
}
651659
},
652-
"required": [
653-
"bootstrapServers"
654-
],
655660
"title": "KafkaConfig",
656661
"type": "object"
657662
},
@@ -2032,6 +2037,12 @@
20322037
},
20332038
"kafka": {
20342039
"$ref": "#/$defs/ProducerConfig",
2040+
"default": {
2041+
"bootstrapServers": "${config.kafka_brokers}",
2042+
"labeledOutputTopics": null,
2043+
"outputTopic": null,
2044+
"schemaRegistryUrl": null
2045+
},
20352046
"description": "Kafka Streams settings"
20362047
},
20372048
"livenessProbe": {
@@ -2273,8 +2284,7 @@
22732284
}
22742285
},
22752286
"required": [
2276-
"image",
2277-
"kafka"
2287+
"image"
22782288
],
22792289
"title": "ProducerAppValues",
22802290
"type": "object"
@@ -2284,18 +2294,26 @@
22842294
"description": "Kafka Streams settings specific to Producer.",
22852295
"properties": {
22862296
"bootstrapServers": {
2297+
"default": "${config.kafka_brokers}",
22872298
"description": "Brokers",
22882299
"title": "Bootstrapservers",
22892300
"type": "string"
22902301
},
22912302
"labeledOutputTopics": {
2292-
"additionalProperties": {
2293-
"type": "string"
2294-
},
2303+
"anyOf": [
2304+
{
2305+
"additionalProperties": {
2306+
"type": "string"
2307+
},
2308+
"type": "object"
2309+
},
2310+
{
2311+
"type": "null"
2312+
}
2313+
],
22952314
"default": {},
22962315
"description": "Extra output topics",
2297-
"title": "Labeledoutputtopics",
2298-
"type": "object"
2316+
"title": "Labeledoutputtopics"
22992317
},
23002318
"outputTopic": {
23012319
"anyOf": [
@@ -2323,9 +2341,6 @@
23232341
"title": "Schema Registry Url"
23242342
}
23252343
},
2326-
"required": [
2327-
"bootstrapServers"
2328-
],
23292344
"title": "ProducerConfig",
23302345
"type": "object"
23312346
},
@@ -3206,6 +3221,20 @@
32063221
},
32073222
"kafka": {
32083223
"$ref": "#/$defs/kpops__components__streams_bootstrap__streams__model__StreamsConfig",
3224+
"default": {
3225+
"applicationId": null,
3226+
"bootstrapServers": "${config.kafka_brokers}",
3227+
"config": null,
3228+
"deleteOutput": null,
3229+
"errorTopic": null,
3230+
"inputPattern": null,
3231+
"inputTopics": null,
3232+
"labeledInputPatterns": null,
3233+
"labeledInputTopics": null,
3234+
"labeledOutputTopics": null,
3235+
"outputTopic": null,
3236+
"schemaRegistryUrl": null
3237+
},
32093238
"description": "streams-bootstrap kafka section"
32103239
},
32113240
"livenessProbe": {
@@ -3426,8 +3455,7 @@
34263455
}
34273456
},
34283457
"required": [
3429-
"image",
3430-
"kafka"
3458+
"image"
34313459
],
34323460
"title": "StreamsAppValues",
34333461
"type": "object"
@@ -4450,15 +4478,23 @@
44504478
"title": "Unique application ID"
44514479
},
44524480
"bootstrapServers": {
4481+
"default": "${config.kafka_brokers}",
44534482
"description": "Brokers",
44544483
"title": "Bootstrapservers",
44554484
"type": "string"
44564485
},
44574486
"config": {
4487+
"anyOf": [
4488+
{
4489+
"type": "object"
4490+
},
4491+
{
4492+
"type": "null"
4493+
}
4494+
],
44584495
"default": {},
44594496
"description": "Configuration",
4460-
"title": "Config",
4461-
"type": "object"
4497+
"title": "Config"
44624498
},
44634499
"deleteOutput": {
44644500
"anyOf": [
@@ -4499,43 +4535,71 @@
44994535
"title": "Inputpattern"
45004536
},
45014537
"inputTopics": {
4538+
"anyOf": [
4539+
{
4540+
"items": {
4541+
"type": "string"
4542+
},
4543+
"type": "array"
4544+
},
4545+
{
4546+
"type": "null"
4547+
}
4548+
],
45024549
"default": [],
45034550
"description": "Input topics",
4504-
"items": {
4505-
"type": "string"
4506-
},
4507-
"title": "Inputtopics",
4508-
"type": "array"
4551+
"title": "Inputtopics"
45094552
},
45104553
"labeledInputPatterns": {
4511-
"additionalProperties": {
4512-
"type": "string"
4513-
},
4554+
"anyOf": [
4555+
{
4556+
"additionalProperties": {
4557+
"type": "string"
4558+
},
4559+
"type": "object"
4560+
},
4561+
{
4562+
"type": "null"
4563+
}
4564+
],
45144565
"default": {},
45154566
"description": "Extra input patterns",
4516-
"title": "Labeledinputpatterns",
4517-
"type": "object"
4567+
"title": "Labeledinputpatterns"
45184568
},
45194569
"labeledInputTopics": {
4520-
"additionalProperties": {
4521-
"items": {
4522-
"type": "string"
4570+
"anyOf": [
4571+
{
4572+
"additionalProperties": {
4573+
"items": {
4574+
"type": "string"
4575+
},
4576+
"type": "array"
4577+
},
4578+
"type": "object"
45234579
},
4524-
"type": "array"
4525-
},
4580+
{
4581+
"type": "null"
4582+
}
4583+
],
45264584
"default": {},
45274585
"description": "Extra input topics",
4528-
"title": "Labeledinputtopics",
4529-
"type": "object"
4586+
"title": "Labeledinputtopics"
45304587
},
45314588
"labeledOutputTopics": {
4532-
"additionalProperties": {
4533-
"type": "string"
4534-
},
4589+
"anyOf": [
4590+
{
4591+
"additionalProperties": {
4592+
"type": "string"
4593+
},
4594+
"type": "object"
4595+
},
4596+
{
4597+
"type": "null"
4598+
}
4599+
],
45354600
"default": {},
45364601
"description": "Extra output topics",
4537-
"title": "Labeledoutputtopics",
4538-
"type": "object"
4602+
"title": "Labeledoutputtopics"
45394603
},
45404604
"outputTopic": {
45414605
"anyOf": [
@@ -4563,9 +4627,6 @@
45634627
"title": "Schema Registry Url"
45644628
}
45654629
},
4566-
"required": [
4567-
"bootstrapServers"
4568-
],
45694630
"title": "StreamsConfig",
45704631
"type": "object"
45714632
},

0 commit comments

Comments
 (0)