sedai.workloads
This class represents a specification for a container in a Kubernetes workload.
Represents the base class for all Kubernetes workloads in Sedai.
This class defines the common attributes and behavior shared across different types of Kubernetes workloads, such as name, namespace, cluster details, and container specifications.
It serves as the foundation for more specialized workload classes, such as
SedaiScalableKubeWorkload
, which extends this class to include scalability-related fields
like replica counts, labels, and annotations.
List of load balancer IDs associated with the workload.
Mapping node IDs to the number of replicas running on each node.
This class represents various scalable Kubernetes workload types,
including ReplicationController
, Deployment
, ReplicaSet
, Rollout
, and StatefulSet
.
Extends the SedaiKubeWorkload
base class by adding fields related to scalability,
such as the number of ready, updated, and available pod replicas. Also includes
additional metadata like labels and annotations.
The number of pod replicas that have been updated to match the latest workload revision.
Returns all Kubernetes workloads for a given account ID.
Parameters
- account_id: The ID of the account for which to fetch workloads.
- namespace: Optional namespace to filter workloads. If
None
, all namespaces are considered. - pagination_config: The pagination configuration for fetching kubernetes workload. Refer to
sedai.pagination.PaginationConfig
for more details about the available options. If no pagination_config is given it will use the default pagination configuration,sedai.pagination.DEFAULT_PAGINATION_CONFIG
.
Returns
List of
SedaiKubeWorkload
instances, orNone
if no workloads exist.