Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor streams-bootstrap cleanup jobs as individual HelmApp #398

Merged
merged 32 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
62bfb03
Refactor workaround for setting Helm app `nameOverride`
disrupted Jan 2, 2024
55089be
Update snapshot assertions
disrupted Jan 2, 2024
8d9bb60
Use consistent naming for app values
disrupted Jan 2, 2024
934e4ed
Rename fixture
disrupted Jan 2, 2024
1c4e313
Refactor
disrupted Jan 2, 2024
2309a7b
Rename
disrupted Jan 2, 2024
7c8ff89
Merge remote-tracking branch 'origin/v3' into refactor/helm-nameoverride
disrupted Jan 2, 2024
f67a23f
Refactor streams-bootstrap cleanup
disrupted Jan 2, 2024
0578cb0
Update tests
disrupted Jan 2, 2024
44195e7
Inherit from common streams-bootstrap app
disrupted Jan 2, 2024
a2a8418
Remove desc
disrupted Jan 2, 2024
3457d1f
Fix failing hooks
disrupted Jan 2, 2024
6ac39da
Merge remote-tracking branch 'origin/v3' into refactor/streams-bootst…
disrupted Jan 2, 2024
a725f03
Cosmetic
disrupted Jan 2, 2024
26ac7f9
Cosmetic
disrupted Jan 2, 2024
b193c03
Rename run to clean
disrupted Jan 2, 2024
9d27adc
Fix returned object type
disrupted Jan 3, 2024
c517a3b
Add pydocs and todo
disrupted Jan 3, 2024
11dcc1e
Create streams-bootstrap base for all components based on its Helm
disrupted Jan 3, 2024
d9786dd
Cleanup KPOps components import
disrupted Jan 3, 2024
a49b551
Fix inheritance order of streams-boostrap apps
disrupted Jan 3, 2024
2e2c7ba
Update components hierarchy diagram
disrupted Jan 3, 2024
02c0ef7
Fix docs
disrupted Jan 4, 2024
70cf1f3
Merge branch 'v3' into refactor/streams-bootstrap-cleanup
disrupted Jan 8, 2024
83ac398
Update defaults schema
disrupted Jan 8, 2024
45c58d8
Add docs for streams-bootstrap
disrupted Jan 8, 2024
7c92421
Add docs for streams-bootstrap
disrupted Jan 8, 2024
a5b621b
Merge remote-tracking branch 'origin/v3' into refactor/streams-bootst…
disrupted Jan 11, 2024
916c239
Update schema
disrupted Jan 11, 2024
e8fc934
Merge remote-tracking branch 'origin/v3' into refactor/streams-bootst…
disrupted Jan 11, 2024
125c20f
Rename variable in test
disrupted Jan 11, 2024
059632e
Cover breaking change in migration guide
disrupted Jan 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/docs/resources/architecture/components-hierarchy.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
```mermaid
flowchart BT
KubernetesApp --> PipelineComponent
KafkaApp --> PipelineComponent
HelmApp --> KubernetesApp
KafkaApp --> HelmApp
StreamsBootstrap --> HelmApp
StreamsApp --> KafkaApp
StreamsApp --> StreamsBootstrap
ProducerApp --> KafkaApp
ProducerApp --> StreamsBootstrap
KafkaConnector --> PipelineComponent
KafkaSourceConnector --> KafkaConnector
KafkaSinkConnector --> KafkaConnector

click KubernetesApp "/kpops/user/core-concepts/components/kubernetes-app"
click HelmApp "/kpops/user/core-concepts/components/helm-app"
click KafkaApp "/kpops/user/core-concepts/components/kafka-app"
click StreamsBootstrap "/kpops/user/core-concepts/components/streams-bootstrap"
click StreamsApp "/kpops/user/core-concepts/components/streams-app"
click ProducerApp "/kpops/user/core-concepts/components/producer-app"
click KafkaConnector "/kpops/user/core-concepts/components/kafka-connector"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ helm-app.yaml:
- app-helm-app.yaml
- repo_config-helm-app.yaml
kafka-app.yaml:
- prefix.yaml
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird that those weren't there before 😛 nobody noticed

- from_.yaml
- to.yaml
- app-kafka-app.yaml
- version-kafka-app.yaml
kafka-connector.yaml:
- prefix.yaml
- from_.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ kpops_components_fields:
- prefix
- from_
- to
- namespace
- app
- repo_config
- version
kafka-connector:
- name
- prefix
Expand Down Expand Up @@ -78,6 +75,15 @@ kpops_components_fields:
- app
- repo_config
- version
streams-bootstrap:
- name
- prefix
- from_
- to
- namespace
- app
- repo_config
- version
kpops_components_inheritance_ref:
helm-app:
bases:
Expand All @@ -87,10 +93,8 @@ kpops_components_inheritance_ref:
- pipeline-component
kafka-app:
bases:
- helm-app
- pipeline-component
parents:
- helm-app
- kubernetes-app
- pipeline-component
kafka-connector:
bases:
Expand Down Expand Up @@ -120,16 +124,27 @@ kpops_components_inheritance_ref:
producer-app:
bases:
- kafka-app
- streams-bootstrap
parents:
- kafka-app
- streams-bootstrap
- helm-app
- kubernetes-app
- pipeline-component
streams-app:
bases:
- kafka-app
- streams-bootstrap
parents:
- kafka-app
- streams-bootstrap
- helm-app
- kubernetes-app
- pipeline-component
streams-bootstrap:
bases:
- helm-app
parents:
- helm-app
- kubernetes-app
- pipeline-component
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ kafka-app.yaml:
- prefix.yaml
- from_.yaml
- to.yaml
- namespace.yaml
- app-kafka-app.yaml
- repo_config-helm-app.yaml
- version-kafka-app.yaml
kafka-connector.yaml:
- prefix.yaml
- from_.yaml
Expand Down
12 changes: 0 additions & 12 deletions docs/docs/resources/pipeline-components/kafka-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
cleanup.policy: compact
models: # SchemaProvider is initiated with the values given here
model: model
namespace: namespace # required
# `app` can contain application-specific settings, hence the user is free to
# add the key-value pairs they need.
app: # required
Expand All @@ -53,14 +52,3 @@
schemaRegistryUrl: ${config.schema_registry.url}
nameOverride: override-with-this-name # kafka-app-specific
imageTag: "1.0.0" # Example values that are shared between streams-app and producer-app
# Helm repository configuration (optional)
# If not set the helm repo add will not be called. Useful when using local Helm charts
repo_config:
repository_name: bakdata-streams-bootstrap # required
url: https://bakdata.github.io/streams-bootstrap/ # required
repo_auth_flags:
username: user
password: pass
ca_file: /home/user/path/to/ca-file
insecure_skip_tls_verify: false
version: "2.12.0" # Helm chart version
12 changes: 0 additions & 12 deletions docs/docs/resources/pipeline-components/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
cleanup.policy: compact
models: # SchemaProvider is initiated with the values given here
model: model
namespace: namespace # required
# `app` can contain application-specific settings, hence the user is free to
# add the key-value pairs they need.
app: # required
Expand All @@ -116,17 +115,6 @@
schemaRegistryUrl: ${config.schema_registry.url}
nameOverride: override-with-this-name # kafka-app-specific
imageTag: "1.0.0" # Example values that are shared between streams-app and producer-app
# Helm repository configuration (optional)
# If not set the helm repo add will not be called. Useful when using local Helm charts
repo_config:
repository_name: bakdata-streams-bootstrap # required
url: https://bakdata.github.io/streams-bootstrap/ # required
repo_auth_flags:
username: user
password: pass
ca_file: /home/user/path/to/ca-file
insecure_skip_tls_verify: false
version: "2.12.0" # Helm chart version
# Kafka sink connector
- type: kafka-sink-connector
name: kafka-sink-connector # required
Expand Down
43 changes: 42 additions & 1 deletion docs/docs/resources/pipeline-defaults/defaults-kafka-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,48 @@
# Parent of: ProducerApp, StreamsApp
# Child of: KubernetesApp
kafka-app:
# Pipeline prefix that will prefix every component name. If you wish to not
# have any prefix you can specify an empty string.
prefix: ${pipeline.name}-
from: # Must not be null
topics: # read from topic
${pipeline.name}-input-topic:
type: input # Implied when role is NOT specified
${pipeline.name}-extra-topic:
role: topic-role # Implies `type` to be extra
${pipeline.name}-input-pattern-topic:
type: pattern # Implied to be an input pattern if `role` is undefined
${pipeline.name}-extra-pattern-topic:
type: pattern # Implied to be an extra pattern if `role` is defined
role: some-role
components: # read from specific component
account-producer:
type: output # Implied when role is NOT specified
other-producer:
role: some-role # Implies `type` to be extra
component-as-input-pattern:
type: pattern # Implied to be an input pattern if `role` is undefined
component-as-extra-pattern:
type: pattern # Implied to be an extra pattern if `role` is defined
role: some-role
# Topic(s) into which the component will write output
to:
topics:
${pipeline.name}-output-topic:
type: output # Implied when role is NOT specified
${pipeline.name}-extra-topic:
role: topic-role # Implies `type` to be extra; Will throw an error if `type` is defined
${pipeline.name}-error-topic:
type: error
# Currently KPOps supports Avro and JSON schemas.
key_schema: key-schema # must implement SchemaProvider to use
value_schema: value-schema
partitions_count: 1
replication_factor: 1
configs: # https://kafka.apache.org/documentation/#topicconfigs
cleanup.policy: compact
models: # SchemaProvider is initiated with the values given here
model: model
# `app` can contain application-specific settings, hence the user is free to
# add the key-value pairs they need.
app: # required
Expand All @@ -11,4 +53,3 @@ kafka-app:
schemaRegistryUrl: ${config.schema_registry.url}
nameOverride: override-with-this-name # kafka-app-specific
imageTag: "1.0.0" # Example values that are shared between streams-app and producer-app
version: "2.12.0" # Helm chart version
43 changes: 42 additions & 1 deletion docs/docs/resources/pipeline-defaults/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,48 @@ helm-app:
# Parent of: ProducerApp, StreamsApp
# Child of: KubernetesApp
kafka-app:
# Pipeline prefix that will prefix every component name. If you wish to not
# have any prefix you can specify an empty string.
prefix: ${pipeline.name}-
from: # Must not be null
topics: # read from topic
${pipeline.name}-input-topic:
type: input # Implied when role is NOT specified
${pipeline.name}-extra-topic:
role: topic-role # Implies `type` to be extra
${pipeline.name}-input-pattern-topic:
type: pattern # Implied to be an input pattern if `role` is undefined
${pipeline.name}-extra-pattern-topic:
type: pattern # Implied to be an extra pattern if `role` is defined
role: some-role
components: # read from specific component
account-producer:
type: output # Implied when role is NOT specified
other-producer:
role: some-role # Implies `type` to be extra
component-as-input-pattern:
type: pattern # Implied to be an input pattern if `role` is undefined
component-as-extra-pattern:
type: pattern # Implied to be an extra pattern if `role` is defined
role: some-role
# Topic(s) into which the component will write output
to:
topics:
${pipeline.name}-output-topic:
type: output # Implied when role is NOT specified
${pipeline.name}-extra-topic:
role: topic-role # Implies `type` to be extra; Will throw an error if `type` is defined
${pipeline.name}-error-topic:
type: error
# Currently KPOps supports Avro and JSON schemas.
key_schema: key-schema # must implement SchemaProvider to use
value_schema: value-schema
partitions_count: 1
replication_factor: 1
configs: # https://kafka.apache.org/documentation/#topicconfigs
cleanup.policy: compact
models: # SchemaProvider is initiated with the values given here
model: model
# `app` can contain application-specific settings, hence the user is free to
# add the key-value pairs they need.
app: # required
Expand All @@ -32,7 +74,6 @@ kafka-app:
schemaRegistryUrl: ${config.schema_registry.url}
nameOverride: override-with-this-name # kafka-app-specific
imageTag: "1.0.0" # Example values that are shared between streams-app and producer-app
version: "2.12.0" # Helm chart version
# Kafka connector
#
# Parent of: KafkaSinkConnector, KafkaSourceConnector
Expand Down
Loading