Skip to content

Commit

Permalink
Apply SerializeAsOptional to streams-bootstrap v2
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted committed Dec 17, 2024
1 parent 1043311 commit 92c9698
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/docs/schema/defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@
"type": "null"
}
],
"default": null,
"default": [],
"description": "Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling.",
"title": "Tolerations"
}
Expand Down Expand Up @@ -2739,7 +2739,7 @@
"type": "null"
}
],
"default": null,
"default": [],
"description": "Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling.",
"title": "Tolerations"
}
Expand Down Expand Up @@ -3391,7 +3391,7 @@
"type": "null"
}
],
"default": null,
"default": [],
"description": "Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling.",
"title": "Tolerations"
}
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/schema/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@
"type": "null"
}
],
"default": null,
"default": [],
"description": "Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling.",
"title": "Tolerations"
}
Expand Down Expand Up @@ -2399,7 +2399,7 @@
"type": "null"
}
],
"default": null,
"default": [],
"description": "Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling.",
"title": "Tolerations"
}
Expand Down
8 changes: 5 additions & 3 deletions kpops/components/streams_bootstrap_v2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
from kpops.utils.pydantic import (
CamelCaseConfigModel,
DescConfigModel,
SerializeAsOptionalModel,
exclude_by_value,
exclude_defaults,
)
from tests.utils.test_pydantic import SerializeAsOptional

if TYPE_CHECKING:
try:
Expand Down Expand Up @@ -97,7 +99,7 @@ def serialize_model(
)


class StreamsBootstrapV2Values(HelmAppValues):
class StreamsBootstrapV2Values(SerializeAsOptionalModel, HelmAppValues):
"""Base value class for all streams bootstrap v2 related components.
:param image_tag: Docker image tag of the streams-bootstrap-v2 app.
Expand All @@ -120,8 +122,8 @@ class StreamsBootstrapV2Values(HelmAppValues):
description=describe_attr("affinity", __doc__),
)

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

Expand Down

0 comments on commit 92c9698

Please sign in to comment.