class_docstr: Base configuration builder for Kubernetes replication controllers
class_docstr_tok: ["Base","configuration","builder","for","Kubernetes","replication","controllers"]
code: def build_container(self):
      resources_dict = {
          "requests": self._resource_request.build()
          if self._resource_request
          else None,
          "limits": self._resource_limit.build()
          if self._resource_limit
          else None,
      }
      return _remove_nones(
          {
              "imagePullPolicy": "Always",
              "command": self.build_container_command(),
              "env": [env.build() for env in self._envs.values()]
              or None,
              "image": self._image,
              "name": self.container_name,
              "resources": dict(
                  (k, v) for k, v in resources_dict.items() if v
              )
              or None,
          }
      )
  
imports: from urllib.parse import urlparse
  from ...utils import parse_readable_size, calc_size_by_str
  from ..kubernetes.config import ContainerEnvConfig
label_desc: Use image node_id 6 for calling the ReplicaSpecConfig obj's underlying member method code with example usage: obj.build_container() and returns: _remove_nones