Skip to content
Closed
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
21 changes: 21 additions & 0 deletions src/ansys/hps/client/rms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,11 @@ class KubernetesKedaBackend(DictModel):
description="Kubernetes resource kind that the scaler should target. Options are ``deployment``, ``job``, and ``statefulset``.",
title="Target Resource Kind",
)
use_keda_scaling: bool | None = Field(
True,
description="Whether to use Keda ScaledJobs and ScaledObjects, otherwise will use plain K8s Jobs and Deployments.",
title="Use Keda Scaling",
)
service_name: str | None = Field(
"ansys/rep/scaling",
description="Service name to be used in prometheus query when fetching metric data.",
Expand All @@ -304,6 +309,11 @@ class KubernetesKedaBackend(DictModel):

class KubernetesResourceScaling(DictModel):
plugin_name: Literal["kubernetes_resource_scaling"] = Field(..., title="Plugin Name")
scaling_factor: int | None = Field(
1,
description="Number of tasks needed to launch each additional evaluator.",
title="Scaling Factor",
)
target_resource_kind: str | None = Field(
"job",
description="Kubernetes resource kind that the scaler should target. Options are ``deployment``, ``job``, and ``statefulset``.",
Expand Down Expand Up @@ -341,6 +351,11 @@ class Machine(DictModel):

class MaxAvailableResourceScaling(DictModel):
plugin_name: Literal["max_available_resource_scaling"] = Field(..., title="Plugin Name")
scaling_factor: int | None = Field(
1,
description="Number of tasks needed to launch each additional evaluator.",
title="Scaling Factor",
)
match_all_requirements: bool | None = Field(
False,
description="Whether scaling should work with available resource properties specified in the compute resource set (default) or require a match of all requirements of the task definition.",
Expand Down Expand Up @@ -592,6 +607,11 @@ class ScalerApplicationInfo(DictModel):
description="Period to wait before scaling down the resource to 0 instances.",
title="Cool Down Period",
)
scaling_factor: int | None = Field(
None,
description="Number of tasks needed to launch each additional evaluator.",
title="Scaling Factor",
)
debug: bool | None = Field(
None,
description="Whether to enable additional debug logging and keep job working directories.",
Expand Down Expand Up @@ -866,6 +886,7 @@ class ComputeResourceSet(DictModel):
scaling_strategy: MaxAvailableResourceScaling | KubernetesResourceScaling | None = Field(
{
"plugin_name": "max_available_resource_scaling",
"scaling_factor": 1,
"match_all_requirements": False,
},
description="Scaling strategy to use in the compute resource set.",
Expand Down
Loading