diff --git a/docs/docs/schema/defaults.json b/docs/docs/schema/defaults.json index 2132826af..fb978b0d9 100644 --- a/docs/docs/schema/defaults.json +++ b/docs/docs/schema/defaults.json @@ -2383,26 +2383,30 @@ "description": "Model representing the resource specifications for a Kubernetes container.", "properties": { "limits": { - "allOf": [ + "anyOf": [ { "$ref": "#/$defs/ResourceDefinition" + }, + { + "type": "null" } ], + "default": null, "description": "The maximum resource limits for the container." }, "requests": { - "allOf": [ + "anyOf": [ { "$ref": "#/$defs/ResourceDefinition" + }, + { + "type": "null" } ], + "default": null, "description": "The minimum resource requirements for the container." } }, - "required": [ - "requests", - "limits" - ], "title": "Resources", "type": "object" }, diff --git a/docs/docs/schema/pipeline.json b/docs/docs/schema/pipeline.json index af9302c82..4afa89596 100644 --- a/docs/docs/schema/pipeline.json +++ b/docs/docs/schema/pipeline.json @@ -2043,26 +2043,30 @@ "description": "Model representing the resource specifications for a Kubernetes container.", "properties": { "limits": { - "allOf": [ + "anyOf": [ { "$ref": "#/$defs/ResourceDefinition" + }, + { + "type": "null" } ], + "default": null, "description": "The maximum resource limits for the container." }, "requests": { - "allOf": [ + "anyOf": [ { "$ref": "#/$defs/ResourceDefinition" + }, + { + "type": "null" } ], + "default": null, "description": "The minimum resource requirements for the container." } }, - "required": [ - "requests", - "limits" - ], "title": "Resources", "type": "object" }, diff --git a/kpops/components/common/kubernetes_model.py b/kpops/components/common/kubernetes_model.py index 6c5f63a0f..967182218 100644 --- a/kpops/components/common/kubernetes_model.py +++ b/kpops/components/common/kubernetes_model.py @@ -389,5 +389,11 @@ class Resources(DescConfigModel): :param limits: The maximum resource limits for the container. """ - requests: ResourceDefinition = Field(description=describe_attr("requests", __doc__)) - limits: ResourceDefinition = Field(description=describe_attr("limits", __doc__)) + requests: ResourceDefinition | None = Field( + default=None, + description=describe_attr("requests", __doc__), + ) + limits: ResourceDefinition | None = Field( + default=None, + description=describe_attr("limits", __doc__), + )