kubernetes.client.models.v1_container 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_container.V1Container(*, args: List[Annotated[str, Strict(strict=True)]] | None = None, command: List[Annotated[str, Strict(strict=True)]] | None = None, env: List[V1EnvVar] | None = None, env_from: List[V1EnvFromSource] | None = None, image: Annotated[str, Strict(strict=True)] | None = None, image_pull_policy: Annotated[str, Strict(strict=True)] | None = None, lifecycle: V1Lifecycle | None = None, liveness_probe: V1Probe | None = None, name: Annotated[str, Strict(strict=True)], ports: List[V1ContainerPort] | None = None, readiness_probe: V1Probe | None = None, resize_policy: List[V1ContainerResizePolicy] | None = None, resources: V1ResourceRequirements | None = None, restart_policy: Annotated[str, Strict(strict=True)] | None = None, restart_policy_rules: List[V1ContainerRestartRule] | None = None, security_context: V1SecurityContext | None = None, startup_probe: V1Probe | None = None, stdin: Annotated[bool, Strict(strict=True)] | None = None, stdin_once: Annotated[bool, Strict(strict=True)] | None = None, termination_message_path: Annotated[str, Strict(strict=True)] | None = None, termination_message_policy: Annotated[str, Strict(strict=True)] | None = None, tty: Annotated[bool, Strict(strict=True)] | None = None, volume_devices: List[V1VolumeDevice] | None = None, volume_mounts: List[V1VolumeMount] | None = None, working_dir: Annotated[str, Strict(strict=True)] | None = None)

Bases: BaseModel

A single application container that you want to run within 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.

args: List[StrictStr] | None
attribute_map: ClassVar[Dict[str, str]] = {'args': 'args', 'command': 'command', 'env': 'env', 'env_from': 'envFrom', 'image': 'image', 'image_pull_policy': 'imagePullPolicy', 'lifecycle': 'lifecycle', 'liveness_probe': 'livenessProbe', 'name': 'name', 'ports': 'ports', 'readiness_probe': 'readinessProbe', 'resize_policy': 'resizePolicy', 'resources': 'resources', 'restart_policy': 'restartPolicy', 'restart_policy_rules': 'restartPolicyRules', 'security_context': 'securityContext', 'startup_probe': 'startupProbe', 'stdin': 'stdin', 'stdin_once': 'stdinOnce', 'termination_message_path': 'terminationMessagePath', 'termination_message_policy': 'terminationMessagePolicy', 'tty': 'tty', 'volume_devices': 'volumeDevices', 'volume_mounts': 'volumeMounts', 'working_dir': 'workingDir'}
command: List[StrictStr] | None
env: List[V1EnvVar] | None
env_from: List[V1EnvFromSource] | None
classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of V1Container from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of V1Container from a JSON string

image: StrictStr | None
image_pull_policy: StrictStr | None
lifecycle: V1Lifecycle | None
liveness_probe: V1Probe | 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].

name: StrictStr
openapi_types: ClassVar[Dict[str, str]] = {'args': 'List[str]', 'command': 'List[str]', 'env': 'List[V1EnvVar]', 'env_from': 'List[V1EnvFromSource]', 'image': 'str', 'image_pull_policy': 'str', 'lifecycle': 'V1Lifecycle', 'liveness_probe': 'V1Probe', 'name': 'str', 'ports': 'List[V1ContainerPort]', 'readiness_probe': 'V1Probe', 'resize_policy': 'List[V1ContainerResizePolicy]', 'resources': 'V1ResourceRequirements', 'restart_policy': 'str', 'restart_policy_rules': 'List[V1ContainerRestartRule]', 'security_context': 'V1SecurityContext', 'startup_probe': 'V1Probe', 'stdin': 'bool', 'stdin_once': 'bool', 'termination_message_path': 'str', 'termination_message_policy': 'str', 'tty': 'bool', 'volume_devices': 'List[V1VolumeDevice]', 'volume_mounts': 'List[V1VolumeMount]', 'working_dir': 'str'}
ports: List[V1ContainerPort] | None
readiness_probe: V1Probe | None
resize_policy: List[V1ContainerResizePolicy] | None
resources: V1ResourceRequirements | None
restart_policy: StrictStr | None
restart_policy_rules: List[V1ContainerRestartRule] | None
security_context: V1SecurityContext | None
startup_probe: V1Probe | None
stdin: StrictBool | None
stdin_once: StrictBool | None
termination_message_path: StrictStr | None
termination_message_policy: StrictStr | 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

tty: StrictBool | None
volume_devices: List[V1VolumeDevice] | None
volume_mounts: List[V1VolumeMount] | None
working_dir: StrictStr | None