Skip to content

Commit

Permalink
Merge branch 'main' into v9
Browse files Browse the repository at this point in the history
  • Loading branch information
raminqaf authored Dec 17, 2024
2 parents c157024 + e6e2ae4 commit 6f074ce
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 2 deletions.
84 changes: 84 additions & 0 deletions docs/docs/schema/defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,18 @@
"additionalProperties": true,
"description": "Settings specific to producers.",
"properties": {
"affinity": {
"anyOf": [
{
"$ref": "#/$defs/Affinity"
},
{
"type": "null"
}
],
"default": null,
"description": "Map to configure pod affinities https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity."
},
"imageTag": {
"default": "latest",
"description": "Docker image tag of the streams-bootstrap-v2 app.",
Expand Down Expand Up @@ -1565,6 +1577,22 @@
}
],
"description": "Kafka Streams settings"
},
"tolerations": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Toleration"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling.",
"title": "Tolerations"
}
},
"required": [
Expand Down Expand Up @@ -2609,6 +2637,18 @@
"additionalProperties": true,
"description": "streams-bootstrap-v2 app configurations.\nThe attributes correspond to keys and values that are used as values for the streams bootstrap helm chart.",
"properties": {
"affinity": {
"anyOf": [
{
"$ref": "#/$defs/Affinity"
},
{
"type": "null"
}
],
"default": null,
"description": "Map to configure pod affinities https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity."
},
"autoscaling": {
"anyOf": [
{
Expand Down Expand Up @@ -2668,6 +2708,22 @@
}
],
"description": "streams-bootstrap-v2 streams section"
},
"tolerations": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Toleration"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling.",
"title": "Tolerations"
}
},
"required": [
Expand Down Expand Up @@ -3264,6 +3320,18 @@
"additionalProperties": true,
"description": "Base value class for all streams bootstrap v2 related components.",
"properties": {
"affinity": {
"anyOf": [
{
"$ref": "#/$defs/Affinity"
},
{
"type": "null"
}
],
"default": null,
"description": "Map to configure pod affinities https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity."
},
"imageTag": {
"default": "latest",
"description": "Docker image tag of the streams-bootstrap-v2 app.",
Expand Down Expand Up @@ -3292,6 +3360,22 @@
}
],
"description": ""
},
"tolerations": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Toleration"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling.",
"title": "Tolerations"
}
},
"required": [
Expand Down
56 changes: 56 additions & 0 deletions docs/docs/schema/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,18 @@
"additionalProperties": true,
"description": "Settings specific to producers.",
"properties": {
"affinity": {
"anyOf": [
{
"$ref": "#/$defs/Affinity"
},
{
"type": "null"
}
],
"default": null,
"description": "Map to configure pod affinities https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity."
},
"imageTag": {
"default": "latest",
"description": "Docker image tag of the streams-bootstrap-v2 app.",
Expand Down Expand Up @@ -1225,6 +1237,22 @@
}
],
"description": "Kafka Streams settings"
},
"tolerations": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Toleration"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling.",
"title": "Tolerations"
}
},
"required": [
Expand Down Expand Up @@ -2269,6 +2297,18 @@
"additionalProperties": true,
"description": "streams-bootstrap-v2 app configurations.\nThe attributes correspond to keys and values that are used as values for the streams bootstrap helm chart.",
"properties": {
"affinity": {
"anyOf": [
{
"$ref": "#/$defs/Affinity"
},
{
"type": "null"
}
],
"default": null,
"description": "Map to configure pod affinities https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity."
},
"autoscaling": {
"anyOf": [
{
Expand Down Expand Up @@ -2328,6 +2368,22 @@
}
],
"description": "streams-bootstrap-v2 streams section"
},
"tolerations": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Toleration"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling.",
"title": "Tolerations"
}
},
"required": [
Expand Down
11 changes: 11 additions & 0 deletions docs/docs/user/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# Changelog
## [8.3.0](https://github.com/bakdata/kpops/releases/tag/8.3.0) - Release Date: [2024-12-17]

### 🌀 Miscellaneous

- Add Kubernetes affinity and tolerations to streams-bootstrap v2 values - [#567](https://github.com/bakdata/kpops/pull/567)






## [8.2.0](https://github.com/bakdata/kpops/releases/tag/8.2.0) - Release Date: [2024-12-12]

### 🐛 Fixes
Expand Down
13 changes: 13 additions & 0 deletions kpops/components/streams_bootstrap_v2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from kpops.component_handlers.helm_wrapper.model import HelmRepoConfig
from kpops.components.base_components import KafkaApp
from kpops.components.base_components.helm_app import HelmApp, HelmAppValues
from kpops.components.common.kubernetes_model import Affinity, Toleration
from kpops.components.common.topic import KafkaTopic, KafkaTopicStr
from kpops.utils.docstring import describe_attr
from kpops.utils.pydantic import (
Expand Down Expand Up @@ -94,6 +95,8 @@ class StreamsBootstrapV2Values(HelmAppValues):
"""Base value class for all streams bootstrap v2 related components.
:param image_tag: Docker image tag of the streams-bootstrap-v2 app.
:param affinity: Map to configure pod affinities https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity.
:param tolerations: Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling.
"""

image_tag: str = Field(
Expand All @@ -106,6 +109,16 @@ class StreamsBootstrapV2Values(HelmAppValues):
description=describe_attr("streams", __doc__),
)

affinity: Affinity | None = Field(
default=None,
description=describe_attr("affinity", __doc__),
)

tolerations: list[Toleration] | None = Field(
default=None,
description=describe_attr("tolerations", __doc__),
)


@deprecated("StreamsBootstrapV2 component is deprecated, use StreamsBootstrap instead.")
class StreamsBootstrapV2(KafkaApp, HelmApp, ABC):
Expand Down
2 changes: 1 addition & 1 deletion kpops/const/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "8.2.0"
__version__ = "8.3.0"
KPOPS = "KPOps"
KPOPS_MODULE = "kpops."
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "kpops"
version = "8.2.0"
version = "8.3.0"
description = "KPOps is a tool to deploy Kafka pipelines to Kubernetes"
authors = ["bakdata <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 6f074ce

Please sign in to comment.