kubernetes_asyncio.client.models.v1_pod_spec module
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.34.3 Generated by: https://openapi-generator.tech
- class kubernetes_asyncio.client.models.v1_pod_spec.V1PodSpec(active_deadline_seconds=None, affinity=None, automount_service_account_token=None, containers=None, dns_config=None, dns_policy=None, enable_service_links=None, ephemeral_containers=None, host_aliases=None, host_ipc=None, host_network=None, host_pid=None, host_users=None, hostname=None, hostname_override=None, image_pull_secrets=None, init_containers=None, node_name=None, node_selector=None, os=None, overhead=None, preemption_policy=None, priority=None, priority_class_name=None, readiness_gates=None, resource_claims=None, resources=None, restart_policy=None, runtime_class_name=None, scheduler_name=None, scheduling_gates=None, security_context=None, service_account=None, service_account_name=None, set_hostname_as_fqdn=None, share_process_namespace=None, subdomain=None, termination_grace_period_seconds=None, tolerations=None, topology_spread_constraints=None, volumes=None, local_vars_configuration=None)
Bases:
objectNOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech
Do not edit the class manually.
- property active_deadline_seconds
Gets the active_deadline_seconds of this V1PodSpec. # noqa: E501
Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. # noqa: E501
- Returns:
The active_deadline_seconds of this V1PodSpec. # noqa: E501
- Return type:
int
- property affinity
Gets the affinity of this V1PodSpec. # noqa: E501
- Returns:
The affinity of this V1PodSpec. # noqa: E501
- Return type:
- attribute_map = {'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', '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'}
- property automount_service_account_token
Gets the automount_service_account_token of this V1PodSpec. # noqa: E501
AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. # noqa: E501
- Returns:
The automount_service_account_token of this V1PodSpec. # noqa: E501
- Return type:
bool
- property containers
Gets the containers of this V1PodSpec. # noqa: E501
List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. # noqa: E501
- Returns:
The containers of this V1PodSpec. # noqa: E501
- Return type:
list[V1Container]
- property dns_config
Gets the dns_config of this V1PodSpec. # noqa: E501
- Returns:
The dns_config of this V1PodSpec. # noqa: E501
- Return type:
- property dns_policy
Gets the dns_policy of this V1PodSpec. # noqa: E501
Set DNS policy for the pod. Defaults to “ClusterFirst”. Valid values are ‘ClusterFirstWithHostNet’, ‘ClusterFirst’, ‘Default’ or ‘None’. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to ‘ClusterFirstWithHostNet’. # noqa: E501
- Returns:
The dns_policy of this V1PodSpec. # noqa: E501
- Return type:
str
- property enable_service_links
Gets the enable_service_links of this V1PodSpec. # noqa: E501
EnableServiceLinks indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. Optional: Defaults to true. # noqa: E501
- Returns:
The enable_service_links of this V1PodSpec. # noqa: E501
- Return type:
bool
- property ephemeral_containers
Gets the ephemeral_containers of this V1PodSpec. # noqa: E501
List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod’s ephemeralcontainers subresource. # noqa: E501
- Returns:
The ephemeral_containers of this V1PodSpec. # noqa: E501
- Return type:
list[V1EphemeralContainer]
- property host_aliases
Gets the host_aliases of this V1PodSpec. # noqa: E501
HostAliases is an optional list of hosts and IPs that will be injected into the pod’s hosts file if specified. # noqa: E501
- Returns:
The host_aliases of this V1PodSpec. # noqa: E501
- Return type:
list[V1HostAlias]
- property host_ipc
Gets the host_ipc of this V1PodSpec. # noqa: E501
Use the host’s ipc namespace. Optional: Default to false. # noqa: E501
- Returns:
The host_ipc of this V1PodSpec. # noqa: E501
- Return type:
bool
- property host_network
Gets the host_network of this V1PodSpec. # noqa: E501
Host networking requested for this pod. Use the host’s network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When hostNetwork is true, specified hostPort fields in port definitions must match containerPort, and unspecified hostPort fields in port definitions are defaulted to match containerPort. Default to false. # noqa: E501
- Returns:
The host_network of this V1PodSpec. # noqa: E501
- Return type:
bool
- property host_pid
Gets the host_pid of this V1PodSpec. # noqa: E501
Use the host’s pid namespace. Optional: Default to false. # noqa: E501
- Returns:
The host_pid of this V1PodSpec. # noqa: E501
- Return type:
bool
- property host_users
Gets the host_users of this V1PodSpec. # noqa: E501
Use the host’s user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature. # noqa: E501
- Returns:
The host_users of this V1PodSpec. # noqa: E501
- Return type:
bool
- property hostname
Gets the hostname of this V1PodSpec. # noqa: E501
Specifies the hostname of the Pod If not specified, the pod’s hostname will be set to a system-defined value. # noqa: E501
- Returns:
The hostname of this V1PodSpec. # noqa: E501
- Return type:
str
- property hostname_override
Gets the hostname_override of this V1PodSpec. # noqa: E501
HostnameOverride specifies an explicit override for the pod’s hostname as perceived by the pod. This field only specifies the pod’s hostname and does not affect its DNS records. When this field is set to a non-empty string: - It takes precedence over the values set in hostname and subdomain. - The Pod’s hostname will be set to this value. - setHostnameAsFQDN must be nil or set to false. - hostNetwork must be set to false. This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. Requires the HostnameOverride feature gate to be enabled. # noqa: E501
- Returns:
The hostname_override of this V1PodSpec. # noqa: E501
- Return type:
str
- property image_pull_secrets
Gets the image_pull_secrets of this V1PodSpec. # noqa: E501
ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod # noqa: E501
- Returns:
The image_pull_secrets of this V1PodSpec. # noqa: E501
- Return type:
list[V1LocalObjectReference]
- property init_containers
Gets the init_containers of this V1PodSpec. # noqa: E501
List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ # noqa: E501
- Returns:
The init_containers of this V1PodSpec. # noqa: E501
- Return type:
list[V1Container]
- property node_name
Gets the node_name of this V1PodSpec. # noqa: E501
NodeName indicates in which node this pod is scheduled. If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. This field should not be used to express a desire for the pod to be scheduled on a specific node. https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename # noqa: E501
- Returns:
The node_name of this V1PodSpec. # noqa: E501
- Return type:
str
- property node_selector
Gets the node_selector of this V1PodSpec. # noqa: E501
NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node’s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ # noqa: E501
- Returns:
The node_selector of this V1PodSpec. # noqa: E501
- Return type:
dict(str, str)
- openapi_types = {'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]', '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]'}
- property os
Gets the os of this V1PodSpec. # noqa: E501
- Returns:
The os of this V1PodSpec. # noqa: E501
- Return type:
- property overhead
Gets the overhead of this V1PodSpec. # noqa: E501
Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md # noqa: E501
- Returns:
The overhead of this V1PodSpec. # noqa: E501
- Return type:
dict(str, str)
- property preemption_policy
Gets the preemption_policy of this V1PodSpec. # noqa: E501
PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. # noqa: E501
- Returns:
The preemption_policy of this V1PodSpec. # noqa: E501
- Return type:
str
- property priority
Gets the priority of this V1PodSpec. # noqa: E501
The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. # noqa: E501
- Returns:
The priority of this V1PodSpec. # noqa: E501
- Return type:
int
- property priority_class_name
Gets the priority_class_name of this V1PodSpec. # noqa: E501
If specified, indicates the pod’s priority. “system-node-critical” and “system-cluster-critical” are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. # noqa: E501
- Returns:
The priority_class_name of this V1PodSpec. # noqa: E501
- Return type:
str
- property readiness_gates
Gets the readiness_gates of this V1PodSpec. # noqa: E501
If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to “True” More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates # noqa: E501
- Returns:
The readiness_gates of this V1PodSpec. # noqa: E501
- Return type:
list[V1PodReadinessGate]
- property resource_claims
Gets the resource_claims of this V1PodSpec. # noqa: E501
ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. # noqa: E501
- Returns:
The resource_claims of this V1PodSpec. # noqa: E501
- Return type:
list[V1PodResourceClaim]
- property resources
Gets the resources of this V1PodSpec. # noqa: E501
- Returns:
The resources of this V1PodSpec. # noqa: E501
- Return type:
- property restart_policy
Gets the restart_policy of this V1PodSpec. # noqa: E501
Restart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy # noqa: E501
- Returns:
The restart_policy of this V1PodSpec. # noqa: E501
- Return type:
str
- property runtime_class_name
Gets the runtime_class_name of this V1PodSpec. # noqa: E501
RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the “legacy” RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class # noqa: E501
- Returns:
The runtime_class_name of this V1PodSpec. # noqa: E501
- Return type:
str
- property scheduler_name
Gets the scheduler_name of this V1PodSpec. # noqa: E501
If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. # noqa: E501
- Returns:
The scheduler_name of this V1PodSpec. # noqa: E501
- Return type:
str
- property scheduling_gates
Gets the scheduling_gates of this V1PodSpec. # noqa: E501
SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod. SchedulingGates can only be set at pod creation time, and be removed only afterwards. # noqa: E501
- Returns:
The scheduling_gates of this V1PodSpec. # noqa: E501
- Return type:
list[V1PodSchedulingGate]
- property security_context
Gets the security_context of this V1PodSpec. # noqa: E501
- Returns:
The security_context of this V1PodSpec. # noqa: E501
- Return type:
- property service_account
Gets the service_account of this V1PodSpec. # noqa: E501
DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. # noqa: E501
- Returns:
The service_account of this V1PodSpec. # noqa: E501
- Return type:
str
- property service_account_name
Gets the service_account_name of this V1PodSpec. # noqa: E501
ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ # noqa: E501
- Returns:
The service_account_name of this V1PodSpec. # noqa: E501
- Return type:
str
- property set_hostname_as_fqdn
Gets the set_hostname_as_fqdn of this V1PodSpec. # noqa: E501
If true the pod’s hostname will be configured as the pod’s FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false. # noqa: E501
- Returns:
The set_hostname_as_fqdn of this V1PodSpec. # noqa: E501
- Return type:
bool
Gets the share_process_namespace of this V1PodSpec. # noqa: E501
Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. # noqa: E501
- Returns:
The share_process_namespace of this V1PodSpec. # noqa: E501
- Return type:
bool
- property subdomain
Gets the subdomain of this V1PodSpec. # noqa: E501
If specified, the fully qualified Pod hostname will be “<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>”. If not specified, the pod will not have a domainname at all. # noqa: E501
- Returns:
The subdomain of this V1PodSpec. # noqa: E501
- Return type:
str
- property termination_grace_period_seconds
Gets the termination_grace_period_seconds of this V1PodSpec. # noqa: E501
Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. # noqa: E501
- Returns:
The termination_grace_period_seconds of this V1PodSpec. # noqa: E501
- Return type:
int
- to_dict(serialize=False)
Returns the model properties as a dict
- to_str()
Returns the string representation of the model
- property tolerations
Gets the tolerations of this V1PodSpec. # noqa: E501
If specified, the pod’s tolerations. # noqa: E501
- Returns:
The tolerations of this V1PodSpec. # noqa: E501
- Return type:
list[V1Toleration]
- property topology_spread_constraints
Gets the topology_spread_constraints of this V1PodSpec. # noqa: E501
TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed. # noqa: E501
- Returns:
The topology_spread_constraints of this V1PodSpec. # noqa: E501
- Return type:
- property volumes
Gets the volumes of this V1PodSpec. # noqa: E501
List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes # noqa: E501
- Returns:
The volumes of this V1PodSpec. # noqa: E501
- Return type:
list[V1Volume]