Skip to content

Commit

Permalink
refactor(streams-bootstrap): update JMX remote specification (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 authored Feb 26, 2025
1 parent 05303d6 commit c1eeca7
Show file tree
Hide file tree
Showing 44 changed files with 202 additions and 140 deletions.
34 changes: 30 additions & 4 deletions docs/docs/schema/defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,32 @@
"JMXConfig": {
"description": "JMX configuration options.",
"properties": {
"enabled": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether or not to open JMX port for remote access (e.g., for debugging)",
"title": "Enabled"
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The host to use for JMX remote access.",
"title": "Host"
},
"port": {
"anyOf": [
{
Expand All @@ -286,7 +312,7 @@
}
],
"default": null,
"description": "The jmx port which JMX style metrics are exposed.",
"description": "The JMX port which JMX style metrics are exposed.",
"title": "Port"
}
},
Expand Down Expand Up @@ -1505,7 +1531,7 @@
"description": "streams-bootstrap Helm values"
},
"version": {
"default": "3.6.0",
"default": "3.6.1",
"description": "Helm chart version",
"pattern": "^(\\d+)\\.(\\d+)\\.(\\d+)(-[a-zA-Z]+(\\.[a-zA-Z]+)?)?$",
"title": "Version",
Expand Down Expand Up @@ -2618,7 +2644,7 @@
"description": "streams-bootstrap Helm values"
},
"version": {
"default": "3.6.0",
"default": "3.6.1",
"description": "Helm chart version",
"pattern": "^(\\d+)\\.(\\d+)\\.(\\d+)(-[a-zA-Z]+(\\.[a-zA-Z]+)?)?$",
"title": "Version",
Expand Down Expand Up @@ -3284,7 +3310,7 @@
"description": "streams-bootstrap Helm values"
},
"version": {
"default": "3.6.0",
"default": "3.6.1",
"description": "Helm chart version",
"pattern": "^(\\d+)\\.(\\d+)\\.(\\d+)(-[a-zA-Z]+(\\.[a-zA-Z]+)?)?$",
"title": "Version",
Expand Down
32 changes: 29 additions & 3 deletions docs/docs/schema/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,32 @@
"JMXConfig": {
"description": "JMX configuration options.",
"properties": {
"enabled": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether or not to open JMX port for remote access (e.g., for debugging)",
"title": "Enabled"
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The host to use for JMX remote access.",
"title": "Host"
},
"port": {
"anyOf": [
{
Expand All @@ -286,7 +312,7 @@
}
],
"default": null,
"description": "The jmx port which JMX style metrics are exposed.",
"description": "The JMX port which JMX style metrics are exposed.",
"title": "Port"
}
},
Expand Down Expand Up @@ -1177,7 +1203,7 @@
"description": "streams-bootstrap Helm values"
},
"version": {
"default": "3.6.0",
"default": "3.6.1",
"description": "Helm chart version",
"pattern": "^(\\d+)\\.(\\d+)\\.(\\d+)(-[a-zA-Z]+(\\.[a-zA-Z]+)?)?$",
"title": "Version",
Expand Down Expand Up @@ -2290,7 +2316,7 @@
"description": "streams-bootstrap Helm values"
},
"version": {
"default": "3.6.0",
"default": "3.6.1",
"description": "Helm chart version",
"pattern": "^(\\d+)\\.(\\d+)\\.(\\d+)(-[a-zA-Z]+(\\.[a-zA-Z]+)?)?$",
"title": "Version",
Expand Down
4 changes: 2 additions & 2 deletions kpops/components/streams_bootstrap/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
url="https://bakdata.github.io/streams-bootstrap/",
)

STREAMS_BOOTSTRAP_VERSION = "3.6.0"
STREAMS_BOOTSTRAP_VERSION = "3.6.1"
STREAMS_BOOTSTRAP_VERSION_PATTERN = r"^(\d+)\.(\d+)\.(\d+)(-[a-zA-Z]+(\.[a-zA-Z]+)?)?$"
COMPILED_VERSION_PATTERN = re.compile(STREAMS_BOOTSTRAP_VERSION_PATTERN)

Expand All @@ -35,7 +35,7 @@ class StreamsBootstrap(KafkaApp, HelmApp, ABC):
:param values: streams-bootstrap Helm values
:param repo_config: Configuration of the Helm chart repo to be used for
deploying the component, defaults to streams-bootstrap Helm repo
:param version: Helm chart version, defaults to "3.6.0"
:param version: Helm chart version, defaults to "3.6.1"
"""

values: StreamsBootstrapValues = Field(
Expand Down
12 changes: 11 additions & 1 deletion kpops/components/streams_bootstrap/streams/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,19 @@ class PrometheusJMXExporterConfig(
class JMXConfig(CamelCaseConfigModel, DescConfigModel):
"""JMX configuration options.
:param port: The jmx port which JMX style metrics are exposed.
:param enabled: Whether or not to open JMX port for remote access (e.g., for debugging)
:param host: The host to use for JMX remote access.
:param port: The JMX port which JMX style metrics are exposed.
"""

enabled: bool | None = Field(
default=None,
description=describe_attr("enabled", __doc__),
)
host: str | None = Field(
default=None,
description=describe_attr("host", __doc__),
)
port: int | None = Field(
default=None,
description=describe_attr("port", __doc__),
Expand Down
4 changes: 2 additions & 2 deletions tests/components/streams_bootstrap/test_producer_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ async def test_should_deploy_clean_up_job_with_values_in_cluster_when_clean(
"schemaRegistryUrl": "http://localhost:8081",
},
},
HelmUpgradeInstallFlags(version="3.6.0", wait=True, wait_for_jobs=True),
HelmUpgradeInstallFlags(version="3.6.1", wait=True, wait_for_jobs=True),
)

async def test_clean_should_fall_back_to_local_values_when_validation_of_cluster_values_fails(
Expand Down Expand Up @@ -581,7 +581,7 @@ async def test_clean_should_fall_back_to_local_values_when_validation_of_cluster
"outputTopic": "test-output-topic",
},
},
HelmUpgradeInstallFlags(version="3.6.0", wait=True, wait_for_jobs=True),
HelmUpgradeInstallFlags(version="3.6.1", wait=True, wait_for_jobs=True),
)

def test_validate_cron_expression(self):
Expand Down
14 changes: 7 additions & 7 deletions tests/components/streams_bootstrap/test_streams_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ async def test_deploy_order_when_dry_run_is_false(self, mocker: MockerFixture):
ca_file=None,
insecure_skip_tls_verify=False,
timeout="5m0s",
version="3.6.0",
version="3.6.1",
wait=True,
wait_for_jobs=False,
),
Expand Down Expand Up @@ -518,7 +518,7 @@ async def test_reset_when_dry_run_is_false(
},
},
HelmUpgradeInstallFlags(
version="3.6.0", wait=True, wait_for_jobs=True
version="3.6.1", wait=True, wait_for_jobs=True
),
),
mocker.call.helm_uninstall(
Expand Down Expand Up @@ -584,7 +584,7 @@ async def test_should_clean_streams_app_and_deploy_clean_up_job_and_delete_clean
},
},
HelmUpgradeInstallFlags(
version="3.6.0", wait=True, wait_for_jobs=True
version="3.6.1", wait=True, wait_for_jobs=True
),
),
mocker.call.helm_uninstall(
Expand Down Expand Up @@ -671,7 +671,7 @@ async def test_should_deploy_clean_up_job_with_values_in_cluster_when_reset(
"schemaRegistryUrl": "http://localhost:8081",
},
},
HelmUpgradeInstallFlags(version="3.6.0", wait=True, wait_for_jobs=True),
HelmUpgradeInstallFlags(version="3.6.1", wait=True, wait_for_jobs=True),
)

async def test_should_deploy_clean_up_job_with_values_in_cluster_when_clean(
Expand Down Expand Up @@ -750,7 +750,7 @@ async def test_should_deploy_clean_up_job_with_values_in_cluster_when_clean(
"schemaRegistryUrl": "http://localhost:8081",
},
},
HelmUpgradeInstallFlags(version="3.6.0", wait=True, wait_for_jobs=True),
HelmUpgradeInstallFlags(version="3.6.1", wait=True, wait_for_jobs=True),
)

async def test_get_input_output_topics(self):
Expand Down Expand Up @@ -919,7 +919,7 @@ async def test_stateful_clean_with_dry_run_false(
"persistence": {"enabled": True, "size": "5Gi"},
},
HelmUpgradeInstallFlags(
version="3.6.0", wait=True, wait_for_jobs=True
version="3.6.1", wait=True, wait_for_jobs=True
),
),
mocker.call.helm_uninstall(
Expand Down Expand Up @@ -1041,5 +1041,5 @@ async def test_clean_should_fall_back_to_local_values_when_validation_of_cluster
"deleteOutput": True,
},
},
HelmUpgradeInstallFlags(version="3.6.0", wait=True, wait_for_jobs=True),
HelmUpgradeInstallFlags(version="3.6.1", wait=True, wait_for_jobs=True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_default_configs(self):
repository_name="bakdata-streams-bootstrap",
url="https://bakdata.github.io/streams-bootstrap/",
)
assert streams_bootstrap.version == "3.6.0"
assert streams_bootstrap.version == "3.6.1"
assert streams_bootstrap.namespace == "test-namespace"
assert streams_bootstrap.values.image_tag is None

Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline/resources/custom-config/defaults.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
streams-bootstrap:
version: "3.6.0"
version: "3.6.1"
namespace: development-namespace
values:
kafka:
Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline/resources/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ streams-bootstrap:
kafka:
bootstrapServers: ${config.kafka_brokers}
schemaRegistryUrl: ${config.schema_registry.url}
version: "3.6.0"
version: "3.6.1"

producer-app: # inherits from streams-bootstrap
values:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
streams-bootstrap:
version: "3.6.0"
version: "3.6.1"
2 changes: 1 addition & 1 deletion tests/pipeline/resources/manifest-pipeline/defaults.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
streams-bootstrap:
version: "3.6.0"
version: "3.6.1"
values:
kafka:
bootstrapServers: ${config.kafka_brokers}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kubernetes-app:
namespace: ${NAMESPACE}

streams-bootstrap:
version: "3.6.0"
version: "3.6.1"
values:
kafka:
bootstrapServers: ${config.kafka_brokers}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ stream-bootstrap:
producer-app: {} # inherits from streams-bootstrap

streams-app: # inherits from streams-bootstrap
version: "3.6.0"
version: "3.6.1"
values:
kafka:
config:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ streams-bootstrap:
kafka:
bootstrapServers: "${config.kafka_brokers}"
schema_registry_url: "${config.schema_registry.url}"
version: "3.6.0"
version: "3.6.1"

producer-app:
to:
Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline/resources/streams-bootstrap/defaults.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
streams-bootstrap:
version: "3.6.0"
version: "3.6.1"
values:
imagePullPolicy: IfNotPresent
files:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ streams-bootstrap:
kafka:
bootstrapServers: "${config.kafka_brokers}"
schema_registry_url: "${schema_registry_url}"
version: "3.6.0"
version: "3.6.1"

streams-app: # inherits from streams-bootstrap
values:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
memory: 2G
requests:
memory: 2G
version: 3.6.0
version: 3.6.1
name: app1
namespace: development-namespace
prefix: resources-custom-config-
Expand Down Expand Up @@ -48,7 +48,7 @@
memory: 2G
requests:
memory: 2G
version: 3.6.0
version: 3.6.1
- _cleaner:
name: app2
namespace: development-namespace
Expand All @@ -74,7 +74,7 @@
labels:
pipeline: resources-custom-config
statefulSet: false
version: 3.6.0
version: 3.6.1
name: app2
namespace: development-namespace
prefix: resources-custom-config-
Expand Down Expand Up @@ -111,5 +111,5 @@
labels:
pipeline: resources-custom-config
statefulSet: false
version: 3.6.0
version: 3.6.1

Loading

0 comments on commit c1eeca7

Please sign in to comment.