Skip to content

Commit

Permalink
feat: read Kafka header and propagate in the payload (#1565)
Browse files Browse the repository at this point in the history
Signed-off-by: Vigith Maurice <[email protected]>
  • Loading branch information
vigith authored Mar 15, 2024
1 parent ae89d93 commit 4457ac8
Show file tree
Hide file tree
Showing 13 changed files with 641 additions and 514 deletions.
4 changes: 4 additions & 0 deletions api/json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18849,6 +18849,10 @@
"consumerGroup": {
"type": "string"
},
"includeHeaders": {
"description": "include Kafka headers (this will change the payload struct into a JSON format with _body and _headers)",
"type": "boolean"
},
"sasl": {
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.SASL",
"description": "SASL user to configure SASL connection for kafka broker SASL.enable=true default for SASL."
Expand Down
4 changes: 4 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -18848,6 +18848,10 @@
"consumerGroup": {
"type": "string"
},
"includeHeaders": {
"description": "include Kafka headers (this will change the payload struct into a JSON format with _body and _headers)",
"type": "boolean"
},
"sasl": {
"description": "SASL user to configure SASL connection for kafka broker SASL.enable=true default for SASL.",
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.SASL"
Expand Down
2 changes: 2 additions & 0 deletions config/base/crds/full/numaflow.numaproj.io_pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7323,6 +7323,8 @@ spec:
type: string
consumerGroup:
type: string
includeHeaders:
type: boolean
sasl:
properties:
gssapi:
Expand Down
2 changes: 2 additions & 0 deletions config/base/crds/full/numaflow.numaproj.io_vertices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2975,6 +2975,8 @@ spec:
type: string
consumerGroup:
type: string
includeHeaders:
type: boolean
sasl:
properties:
gssapi:
Expand Down
4 changes: 4 additions & 0 deletions config/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9932,6 +9932,8 @@ spec:
type: string
consumerGroup:
type: string
includeHeaders:
type: boolean
sasl:
properties:
gssapi:
Expand Down Expand Up @@ -14784,6 +14786,8 @@ spec:
type: string
consumerGroup:
type: string
includeHeaders:
type: boolean
sasl:
properties:
gssapi:
Expand Down
4 changes: 4 additions & 0 deletions config/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9932,6 +9932,8 @@ spec:
type: string
consumerGroup:
type: string
includeHeaders:
type: boolean
sasl:
properties:
gssapi:
Expand Down Expand Up @@ -14784,6 +14786,8 @@ spec:
type: string
consumerGroup:
type: string
includeHeaders:
type: boolean
sasl:
properties:
gssapi:
Expand Down
12 changes: 12 additions & 0 deletions docs/APIs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2784,6 +2784,18 @@ default for SASL.
</p>
</td>
</tr>
<tr>
<td>
<code>includeHeaders</code></br> <em> bool </em>
</td>
<td>
<em>(Optional)</em>
<p>
include Kafka headers (this will change the payload struct into a JSON
format with \_body and \_headers)
</p>
</td>
</tr>
</tbody>
</table>
<h3 id="numaflow.numaproj.io/v1alpha1.Lifecycle">
Expand Down
892 changes: 462 additions & 430 deletions pkg/apis/numaflow/v1alpha1/generated.pb.go

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pkg/apis/numaflow/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/apis/numaflow/v1alpha1/kafka_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ type KafkaSource struct {
// SASL.enable=true default for SASL.
// +optional
SASL *SASL `json:"sasl" protobuf:"bytes,6,opt,name=sasl"`
// include Kafka headers (this will change the payload struct into a JSON format with _body and _headers)
// +optional
IncludeHeaders bool `json:"includeHeaders" protobuf:"bytes,7,opt,name=includeHeaders"`
}
8 changes: 8 additions & 0 deletions pkg/apis/numaflow/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4457ac8

Please sign in to comment.