class_docstr: Contains Kubernetes Airflow Worker configuration logic.
  
  Represents a kubernetes pod and manages execution of a single pod.
  Any configuration that is container specific gets applied to
  the first container in the list of containers.
  
  :param image: The docker image
  :param name: name in the metadata section (not the container name)
  :param namespace: pod namespace
  :param volume_mounts: list of kubernetes volumes mounts
  :param envs: A dict containing the environment variables
  :param cmds: The command to be run on the first container
  :param args: The arguments to be run on the pod
  :param labels: labels for the pod metadata
  :param node_selectors: node selectors for the pod
  :param ports: list of ports. Applies to the first container.
  :param volumes: Volumes to be attached to the first container
  :param image_pull_policy: Specify a policy to cache or always pull an image
  :param restart_policy: The restart policy of the pod
  :param image_pull_secrets: Any image pull secrets to be given to the pod.
      If more than one secret is required, provide a comma separated list:
      secret_a,secret_b
  :param init_containers: A list of init containers
  :param service_account_name: Identity for processes that run in a Pod
  :param resources: Resource requirements for the first containers
  :param annotations: annotations for the pod
  :param affinity: A dict containing a group of affinity scheduling rules
  :param hostnetwork: If True enable host networking on the pod
  :param tolerations: A list of kubernetes tolerations
  :param security_context: A dict containing the security context for the pod
  :param configmaps: Any configmap refs to read ``configmaps`` for environments from.
      If more than one configmap is required, provide a comma separated list
      configmap_a,configmap_b
  :param dnspolicy: Specify a dnspolicy for the pod
  :param schedulername: Specify a schedulername for the pod
  :param pod: The fully specified pod. Mutually exclusive with `path_or_string`
  :param extract_xcom: Whether to bring up a container for xcom
  :param priority_class_name: priority class name for the launched Pod
docstr: Add sidecar.
docstr_tok: ["Add","sidecar","."]
code: def add_sidecar(pod: k8s.V1Pod) -> k8s.V1Pod:
      """Add sidecar."""
      pod_cp = copy.deepcopy(pod)
      pod_cp.spec.volumes = pod.spec.volumes or []
      pod_cp.spec.volumes.insert(0, PodDefaults.VOLUME)
      pod_cp.spec.containers[0].volume_mounts = (
          pod_cp.spec.containers[0].volume_mounts or []
      )
      pod_cp.spec.containers[0].volume_mounts.insert(
          0, PodDefaults.VOLUME_MOUNT
      )
      pod_cp.spec.containers.append(PodDefaults.SIDECAR_CONTAINER)
  
      return pod_cp
  
file_path: airflow/airflow/providers/cncf/kubernetes/pod_generator_deprecated.py
imports: from __future__ import annotations
  import copy
  import uuid
  import re2
  from kubernetes.client import models
  from airflow.utils.hashlib_wrapper import md5
label_desc: Use image node_id 3 for calling the PodGenerator obj's underlying member method code with example usage: obj.add_sidecar(pod) and returns: pod_cp