kubex-core¶
Auto-generated reference for the kubex_core package — the shared base models used by both kubex and the generated kubex-k8s-* packages.
Base models¶
kubex_core.models.base ¶
kubex_core.models.base_entity ¶
BaseEntity ¶
Bases: BaseK8sModel
BaseEntity is the common fields for all entities.
Marker interfaces¶
kubex_core.models.interfaces ¶
Resource configuration¶
kubex_core.models.resource_config ¶
ResourceConfig ¶
ResourceConfig(
version: str | None = None,
kind: str | None = None,
plural: str | None = None,
scope: Scope | None = None,
group: str | None = None,
list_model: Type[ListEntity[ResourceType]]
| None = None,
)
Bases: Generic[ResourceType]
ResourceConfig is the configuration for a resource.
Source code in packages/kubex-core/kubex_core/models/resource_config.py
url ¶
url returns the URL for the resource.
Source code in packages/kubex-core/kubex_core/models/resource_config.py
get_version_and_froup_from_api_version ¶
get_version_and_group_from_api_version returns the version and group from the apiVersion.
Source code in packages/kubex-core/kubex_core/models/resource_config.py
Metadata models¶
kubex_core.models.metadata ¶
ListMetadata ¶
Bases: BaseK8sModel
ListMeta describes metadata that synthetic resources must have, including lists and various status objects.
ObjectMetadata ¶
Bases: BaseK8sModel
CommonMetadata is the common metadata for all Kubernetes API objects.
OwnerReference ¶
Bases: BaseK8sModel
OwnerReference contains enough information to let you identify an owning object.
List and watch¶
kubex_core.models.list_entity ¶
ListEntity ¶
Bases: BaseK8sModel, Generic[ResourceType]
ListEntity is the common fields for all list entities.
kubex_core.models.watch_event ¶
Bookmark ¶
EventType ¶
Bases: str, Enum
EventType is the type of the watch event.
WatchEvent ¶
Bases: Generic[ResourceType]
WatchEvent represents a single event from a watch stream.
Source code in packages/kubex-core/kubex_core/models/watch_event.py
Subresource models¶
kubex_core.models.status ¶
Status ¶
Bases: BaseEntity
Status is a return value for calls that don't return other objects.
api_version
class-attribute
instance-attribute
¶
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
code
class-attribute
instance-attribute
¶
Suggested HTTP return code for this status, 0 if not set.
details
class-attribute
instance-attribute
¶
Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
kind
class-attribute
instance-attribute
¶
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
message
class-attribute
instance-attribute
¶
A human-readable description of the status of this operation.
reason
class-attribute
instance-attribute
¶
A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
status
instance-attribute
¶
Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
StatusCause ¶
Bases: BaseK8sModel
StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.
field
class-attribute
instance-attribute
¶
The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. Examples: "name" - the field "name" on the current resource "items[0].name" - the field "name" on the first array entry in "items"
message
instance-attribute
¶
A human-readable description of the cause of the error. This field may be presented as-is to a reader.
reason
class-attribute
instance-attribute
¶
A machine-readable description of the cause of the error. If this value is empty there is no information available.
StatusDetails ¶
Bases: BaseK8sModel
tatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.
causes
class-attribute
instance-attribute
¶
The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.
group
class-attribute
instance-attribute
¶
The group attribute of the resource associated with the status StatusReason.
kind
class-attribute
instance-attribute
¶
The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
name
class-attribute
instance-attribute
¶
The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).
retry_after_seconds
class-attribute
instance-attribute
¶
If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.
uid
class-attribute
instance-attribute
¶
UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids
kubex_core.models.scale ¶
kubex_core.models.eviction ¶
DeleteOptions ¶
Bases: BaseK8sModel
Minimal representation of meta/v1 DeleteOptions for use in Eviction.
Eviction ¶
Bases: BaseK8sModel
Eviction evicts a pod from its node subject to certain policies and safety constraints.
This is a minimal model for the policy/v1 Eviction resource, used by the EvictionAccessor to POST eviction requests.