docstr: Method: patch custom resource object to upgrade milvus
  Params:
      release_name: release name of milvus
      configs: a dict type like configurations to be upgrade milvus
      namespace: namespace that the milvus is running in
docstr_tok: ["Method",":","patch","custom","resource","object","to","upgrade","milvus","Params",":","release_name",":","release","name","of","milvus","configs",":","a","dict","type","like","configurations","to","be","upgrade","milvus","namespace",":","namespace","that","the","milvus","is","running","in"]
code: def upgrade(self, release_name, configs, namespace="default"):
      """
      Method: patch custom resource object to upgrade milvus
      Params:
          release_name: release name of milvus
          configs: a dict type like configurations to be upgrade milvus
          namespace: namespace that the milvus is running in
      """
      if not isinstance(configs, dict):
          log.error("customize configurations must be in dict type")
          return None
  
      d_configs = benedict()
  
      for key in configs.keys():
          d_configs[key] = configs[key]
  
      cus_res = CusResource(
          kind=self.plural,
          group=self.group,
          version=self.version,
          namespace=namespace,
      )
      log.debug(f"upgrade milvus with configs: {d_configs}")
      cus_res.patch(release_name, d_configs)
  
file_path: milvus/tests/python_client/customize/milvus_operator.py
imports: import json
  import os
  import time
  from benedict import benedict
  from utils.util_log import test_log
  from common.cus_resource_opts import CustomResourceOperations
label_desc: Use image node_id 5 for calling the MilvusOperator obj's underlying member method code with example usage: obj.upgrade(release_name, configs, namespace) and returns: None