code: def testBuildPodManifest_InsideKfp_OverrideConfig(self):
      # Prepare mocks and variables.
      self._AssumeInsideKfp()
      k8s_config_dict = {
          "service_account_name": "chocolate-latte",
          "active_deadline_seconds": 123,
          "serving_pod_overrides": {
              "annotations": {"best_ticker": "goog"},
              "env": [
                  {"name": "TICKER", "value": "GOOG"},
                  {"name": "NAME_ONLY"},
                  {
                      "name": "SECRET",
                      "value_from": {
                          "secret_key_ref": {
                              "name": "my_secret",
                              "key": "my_key",
                          }
                      },
                  },
              ],
              "resources": {
                  "requests": {"memory": "2Gi", "cpu": "1"},
                  "limits": {"memory": "4Gi", "cpu": "2"},
              },
          },
      }
      runner = self._CreateKubernetesRunner(
          k8s_config_dict=k8s_config_dict
      )
  
      # Act.
      pod_manifest = runner._BuildPodManifest()
  
      # Check result.
      self.assertEqual(
          pod_manifest.spec.service_account_name, "chocolate-latte"
      )
      self.assertEqual(pod_manifest.spec.active_deadline_seconds, 123)
      self.assertEqual(
          pod_manifest.metadata.annotations, {"best_ticker": "goog"}
      )
      container_envs = {
          env.name: env for env in pod_manifest.spec.containers[0].env
      }
      self.assertEqual(container_envs["TICKER"].value, "GOOG")
      self.assertEqual(container_envs["NAME_ONLY"].value, "")
      self.assertEqual(
          container_envs["SECRET"].value_from.secret_key_ref.name,
          "my_secret",
      )
      self.assertEqual(
          container_envs["SECRET"].value_from.secret_key_ref.key,
          "my_key",
      )
      container_resources = pod_manifest.spec.containers[0].resources
      self.assertDictEqual(
          container_resources.to_dict(),
          k8s_config_dict["serving_pod_overrides"]["resources"],
      )
  
imports: import os
  from typing import Any, Dict
  from unittest import mock
  from kubernetes import client
  from kubernetes.client import rest
  import tensorflow
  from tfx.components.infra_validator import error_types
  from tfx.components.infra_validator import serving_bins
  from tfx.components.infra_validator.model_server_runners import kubernetes_runner
  from tfx.proto import infra_validator_pb2
  from tfx.types import standard_artifacts
  from tfx.utils import kube_utils
  from tfx.utils import path_utils
  from google.protobuf import json_format
label_desc: Use image node_id 8 for calling the KubernetesRunnerTest obj's underlying member method code with example usage: obj.testBuildPodManifest_InsideKfp_OverrideConfig() without return types