Migrate from V1 to V2¶
Derive component type automatically from class name¶
KPOps automatically infers the component type
from the class name. Therefore, the type
and schema_type
attributes can be removed from your custom components. By convention the type
would be the lower, and kebab cased name of the class.
Because of this new convention producer
has been renamed to producer-app
. This must be addressed in your pipeline.yaml
and defaults.yaml
.
Refactor input/output types¶
To section¶
In the to
section these have changed:
- The default type is
output
- If
role
is set, type is inferred to beextra
- The type
error
needs to be defined explicitly
From section¶
In the from
section these have changed:
- The default type is
input
input-pattern
type is replaced bypattern
- If
role
is set, type is inferred to beextra
- If
role
is set, type is explicitly set topattern
, this would be inferred typeextra-pattern
Remove camel case conversion of internal models¶
All the internal KPOps models are now snake_case, and only Helm/Kubernetes values require camel casing. You can find an example of a pipeline.yaml
in the following. Notice that the app
section here remains untouched.
Refactor handling of Helm flags¶
If you are using the KubernetesApp
class to define your own Kubernetes resource to deploy, the abstract function get_helm_chart
that returns the chart for deploying the app using Helm is now a Python property and renamed to helm_chart
.
Plural broker field in pipeline config¶
Since you can pass a comma separated string of broker address, the broker field in KPOps is now plural. The pluralization has affected multiple areas:
config.yaml¶
pipeline.yaml and default.yaml¶
The variable is now called brokers
.
Environment variable¶
Previously, if you set the environment variable KPOPS_KAFKA_BROKER
, you need to replace that now with KPOPS_KAFKA_BROKERS
.