Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
kpops_components_fields:
helm-app:
- name
- enabled
- prefix
- from_
- to
Expand All @@ -11,11 +12,13 @@ kpops_components_fields:
- version
kafka-app:
- name
- enabled
- prefix
- from_
- to
kafka-connector:
- name
- enabled
- prefix
- from_
- to
Expand All @@ -25,6 +28,7 @@ kpops_components_fields:
- resetter_values
kafka-sink-connector:
- name
- enabled
- prefix
- from_
- to
Expand All @@ -34,6 +38,7 @@ kpops_components_fields:
- resetter_values
kafka-source-connector:
- name
- enabled
- prefix
- from_
- to
Expand All @@ -44,18 +49,21 @@ kpops_components_fields:
- offset_topic
kubernetes-app:
- name
- enabled
- prefix
- from_
- to
- namespace
- values
pipeline-component:
- name
- enabled
- prefix
- from_
- to
producer-app:
- name
- enabled
- prefix
- from_
- to
Expand All @@ -66,6 +74,7 @@ kpops_components_fields:
- version
producer-app-v2:
- name
- enabled
- prefix
- from_
- to
Expand All @@ -76,6 +85,7 @@ kpops_components_fields:
- version
streams-app:
- name
- enabled
- prefix
- from_
- to
Expand All @@ -86,6 +96,7 @@ kpops_components_fields:
- version
streams-app-v2:
- name
- enabled
- prefix
- from_
- to
Expand All @@ -96,6 +107,7 @@ kpops_components_fields:
- version
streams-bootstrap:
- name
- enabled
- prefix
- from_
- to
Expand All @@ -106,6 +118,7 @@ kpops_components_fields:
- version
streams-bootstrap-v2:
- name
- enabled
- prefix
- from_
- to
Expand Down
78 changes: 78 additions & 0 deletions docs/docs/schema/defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -563,6 +569,12 @@
"additionalProperties": true,
"description": "Base component for Kafka-based components.",
"properties": {
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -669,6 +681,12 @@
"$ref": "#/$defs/KafkaConnectorConfig",
"description": "Connector config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -814,6 +832,12 @@
"$ref": "#/$defs/KafkaConnectorConfig",
"description": "Connector config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -901,6 +925,12 @@
"$ref": "#/$defs/KafkaConnectorConfig",
"description": "Connector config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -1047,6 +1077,12 @@
"additionalProperties": true,
"description": "Base class for all Kubernetes apps.\nAll built-in components are Kubernetes apps, except for the Kafka connectors.",
"properties": {
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -1379,6 +1415,12 @@
"additionalProperties": true,
"description": "Base class for all components.",
"properties": {
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -1626,6 +1668,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"default": null,
"description": "Producer doesn't support FromSection",
Expand Down Expand Up @@ -1713,6 +1761,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"default": null,
"description": "Producer doesn't support FromSection",
Expand Down Expand Up @@ -2782,6 +2836,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -2876,6 +2936,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -3503,6 +3569,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -3591,6 +3663,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down
42 changes: 42 additions & 0 deletions docs/docs/schema/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -631,6 +637,12 @@
"$ref": "#/$defs/KafkaConnectorConfig",
"description": "Connector config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -718,6 +730,12 @@
"$ref": "#/$defs/KafkaConnectorConfig",
"description": "Connector config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -1281,6 +1299,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"default": null,
"description": "Producer doesn't support FromSection",
Expand Down Expand Up @@ -1368,6 +1392,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"default": null,
"description": "Producer doesn't support FromSection",
Expand Down Expand Up @@ -2437,6 +2467,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down Expand Up @@ -2531,6 +2567,12 @@
},
"description": "Helm diff config"
},
"enabled": {
"default": true,
"description": "Whether the component is enabled and should be included in the pipeline",
"title": "Enabled",
"type": "boolean"
},
"from": {
"anyOf": [
{
Expand Down
5 changes: 5 additions & 0 deletions kpops/components/base_components/pipeline_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ class PipelineComponent(BaseDefaultsComponent, ABC):
"""

name: str
enabled: bool = Field(
default=True,
title="Enabled",
description="Whether the component is enabled and should be included in the pipeline",
)
prefix: str = "${pipeline.name}-"
from_: FromSection | None = Field(
default=None,
Expand Down
3 changes: 3 additions & 0 deletions kpops/pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ def apply_component(
"""
component = component_class(**component_data)
component = self.enrich_component_with_env(component)
# if component is disabled then we skip it
if not component.enabled:
return
# inflate & enrich components
for inflated_component in component.inflate(): # TODO: recursively
if inflated_component.from_:
Expand Down
1 change: 1 addition & 0 deletions tests/components/streams_bootstrap/test_streams_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ def test_generate(self, stateful_streams_app: StreamsApp):
"helm_name_override": STREAMS_APP_HELM_NAME_OVERRIDE,
"helm_release_name": STREAMS_APP_RELEASE_NAME,
"name": STREAMS_APP_NAME,
"enabled": True,
"namespace": NAMESPACE,
"prefix": PREFIX,
"to": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- type: producer-app
name: app1
enabled: false

- type: streams-app
name: app2
Loading
Loading