kubernetes.client.models.v1_pod_spec module

Kubernetes

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: release-1.36 Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

class kubernetes.client.models.v1_pod_spec.V1PodSpec(*, active_deadline_seconds: Annotated[int, Strict(strict=True)] | None = None, affinity: V1Affinity | None = None, automount_service_account_token: Annotated[bool, Strict(strict=True)] | None = None, containers: List[V1Container], dns_config: V1PodDNSConfig | None = None, dns_policy: Annotated[str, Strict(strict=True)] | None = None, enable_service_links: Annotated[bool, Strict(strict=True)] | None = None, ephemeral_containers: List[V1EphemeralContainer] | None = None, host_aliases: List[V1HostAlias] | None = None, host_ipc: Annotated[bool, Strict(strict=True)] | None = None, host_network: Annotated[bool, Strict(strict=True)] | None = None, host_pid: Annotated[bool, Strict(strict=True)] | None = None, host_users: Annotated[bool, Strict(strict=True)] | None = None, hostname: Annotated[str, Strict(strict=True)] | None = None, hostname_override: Annotated[str, Strict(strict=True)] | None = None, image_pull_secrets: List[V1LocalObjectReference] | None = None, init_containers: List[V1Container] | None = None, node_name: Annotated[str, Strict(strict=True)] | None = None, node_selector: Dict[str, Annotated[str, Strict(strict=True)]] | None = None, os: V1PodOS | None = None, overhead: Dict[str, Annotated[str, Strict(strict=True)]] | None = None, preemption_policy: Annotated[str, Strict(strict=True)] | None = None, priority: Annotated[int, Strict(strict=True)] | None = None, priority_class_name: Annotated[str, Strict(strict=True)] | None = None, readiness_gates: List[V1PodReadinessGate] | None = None, resource_claims: List[V1PodResourceClaim] | None = None, resources: V1ResourceRequirements | None = None, restart_policy: Annotated[str, Strict(strict=True)] | None = None, runtime_class_name: Annotated[str, Strict(strict=True)] | None = None, scheduler_name: Annotated[str, Strict(strict=True)] | None = None, scheduling_gates: List[V1PodSchedulingGate] | None = None, scheduling_group: V1PodSchedulingGroup | None = None, security_context: V1PodSecurityContext | None = None, service_account: Annotated[str, Strict(strict=True)] | None = None, service_account_name: Annotated[str, Strict(strict=True)] | None = None, set_hostname_as_fqdn: Annotated[bool, Strict(strict=True)] | None = None, share_process_namespace: Annotated[bool, Strict(strict=True)] | None = None, subdomain: Annotated[str, Strict(strict=True)] | None = None, termination_grace_period_seconds: Annotated[int, Strict(strict=True)] | None = None, tolerations: List[V1Toleration] | None = None, topology_spread_constraints: List[V1TopologySpreadConstraint] | None = None, volumes: List[V1Volume] | None = None)

Bases: BaseModel

PodSpec is a description of a pod.

Attributes:
openapi_types (dict): The key is attribute name

and the value is attribute type.

attribute_map (dict): The key is attribute name

and the value is json key in definition.

active_deadline_seconds: StrictInt | None
affinity: V1Affinity | None
attribute_map: ClassVar[Dict[str, str]] = {'active_deadline_seconds': 'activeDeadlineSeconds', 'affinity': 'affinity', 'automount_service_account_token': 'automountServiceAccountToken', 'containers': 'containers', 'dns_config': 'dnsConfig', 'dns_policy': 'dnsPolicy', 'enable_service_links': 'enableServiceLinks', 'ephemeral_containers': 'ephemeralContainers', 'host_aliases': 'hostAliases', 'host_ipc': 'hostIPC', 'host_network': 'hostNetwork', 'host_pid': 'hostPID', 'host_users': 'hostUsers', 'hostname': 'hostname', 'hostname_override': 'hostnameOverride', 'image_pull_secrets': 'imagePullSecrets', 'init_containers': 'initContainers', 'node_name': 'nodeName', 'node_selector': 'nodeSelector', 'os': 'os', 'overhead': 'overhead', 'preemption_policy': 'preemptionPolicy', 'priority': 'priority', 'priority_class_name': 'priorityClassName', 'readiness_gates': 'readinessGates', 'resource_claims': 'resourceClaims', 'resources': 'resources', 'restart_policy': 'restartPolicy', 'runtime_class_name': 'runtimeClassName', 'scheduler_name': 'schedulerName', 'scheduling_gates': 'schedulingGates', 'scheduling_group': 'schedulingGroup', 'security_context': 'securityContext', 'service_account': 'serviceAccount', 'service_account_name': 'serviceAccountName', 'set_hostname_as_fqdn': 'setHostnameAsFQDN', 'share_process_namespace': 'shareProcessNamespace', 'subdomain': 'subdomain', 'termination_grace_period_seconds': 'terminationGracePeriodSeconds', 'tolerations': 'tolerations', 'topology_spread_constraints': 'topologySpreadConstraints', 'volumes': 'volumes'}
automount_service_account_token: StrictBool | None
containers: List[V1Container]
dns_config: V1PodDNSConfig | None
dns_policy: StrictStr | None
ephemeral_containers: List[V1EphemeralContainer] | None
classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of V1PodSpec from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of V1PodSpec from a JSON string

host_aliases: List[V1HostAlias] | None
host_ipc: StrictBool | None
host_network: StrictBool | None
host_pid: StrictBool | None
host_users: StrictBool | None
hostname: StrictStr | None
hostname_override: StrictStr | None
image_pull_secrets: List[V1LocalObjectReference] | None
init_containers: List[V1Container] | None
model_config = {'extra': 'forbid', 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

node_name: StrictStr | None
node_selector: Dict[str, StrictStr] | None
openapi_types: ClassVar[Dict[str, str]] = {'active_deadline_seconds': 'int', 'affinity': 'V1Affinity', 'automount_service_account_token': 'bool', 'containers': 'List[V1Container]', 'dns_config': 'V1PodDNSConfig', 'dns_policy': 'str', 'enable_service_links': 'bool', 'ephemeral_containers': 'List[V1EphemeralContainer]', 'host_aliases': 'List[V1HostAlias]', 'host_ipc': 'bool', 'host_network': 'bool', 'host_pid': 'bool', 'host_users': 'bool', 'hostname': 'str', 'hostname_override': 'str', 'image_pull_secrets': 'List[V1LocalObjectReference]', 'init_containers': 'List[V1Container]', 'node_name': 'str', 'node_selector': 'Dict[str, str]', 'os': 'V1PodOS', 'overhead': 'Dict[str, str]', 'preemption_policy': 'str', 'priority': 'int', 'priority_class_name': 'str', 'readiness_gates': 'List[V1PodReadinessGate]', 'resource_claims': 'List[V1PodResourceClaim]', 'resources': 'V1ResourceRequirements', 'restart_policy': 'str', 'runtime_class_name': 'str', 'scheduler_name': 'str', 'scheduling_gates': 'List[V1PodSchedulingGate]', 'scheduling_group': 'V1PodSchedulingGroup', 'security_context': 'V1PodSecurityContext', 'service_account': 'str', 'service_account_name': 'str', 'set_hostname_as_fqdn': 'bool', 'share_process_namespace': 'bool', 'subdomain': 'str', 'termination_grace_period_seconds': 'int', 'tolerations': 'List[V1Toleration]', 'topology_spread_constraints': 'List[V1TopologySpreadConstraint]', 'volumes': 'List[V1Volume]'}
os: V1PodOS | None
overhead: Dict[str, StrictStr] | None
preemption_policy: StrictStr | None
priority: StrictInt | None
priority_class_name: StrictStr | None
readiness_gates: List[V1PodReadinessGate] | None
resource_claims: List[V1PodResourceClaim] | None
resources: V1ResourceRequirements | None
restart_policy: StrictStr | None
runtime_class_name: StrictStr | None
scheduler_name: StrictStr | None
scheduling_gates: List[V1PodSchedulingGate] | None
scheduling_group: V1PodSchedulingGroup | None
security_context: V1PodSecurityContext | None
service_account: StrictStr | None
service_account_name: StrictStr | None
set_hostname_as_fqdn: StrictBool | None
share_process_namespace: StrictBool | None
subdomain: StrictStr | None
termination_grace_period_seconds: StrictInt | None
to_dict(serialize: bool = False) Dict[str, Any]

Return all declared model fields using public or wire names.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model

tolerations: List[V1Toleration] | None
topology_spread_constraints: List[V1TopologySpreadConstraint] | None
volumes: List[V1Volume] | None