Workload#

pydantic model phalanx.models.kubernetes.Workload#

A Kubernetes resource that can be scaled up and down.

Parameters:

data (Any)

Show JSON schema
{
   "title": "Workload",
   "description": "A Kubernetes resource that can be scaled up and down.",
   "type": "object",
   "properties": {
      "kind": {
         "title": "Kind",
         "type": "string"
      },
      "namespace": {
         "title": "Namespace",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "replicas": {
         "title": "Replicas",
         "type": "integer"
      },
      "previous_replica_count": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Previous Replica Count"
      }
   },
   "required": [
      "kind",
      "namespace",
      "name",
      "replicas"
   ]
}

Config:
  • validate_by_name: bool = True

Fields:
field kind: str [Required]#

The kind of Kubernetes resource.

field name: str [Required]#

The name of the resource.

field namespace: str [Required]#

The namespace the resource is in.

field previous_replica_count: Optional[int] = None#

The original number of replicas if we explicitly scaled down.

field replicas: int [Required]#