def __init__()

in python-batch/gke_batch/batch.py [0:0]


  def __init__(self) -> None:

    self.job_prefix = get_setting("job_prefix",settings)

    kubernetes.config.load_kube_config()
    try:
        self.kube_config = Configuration().get_default_copy()
    except AttributeError:
        self.kube_config = Configuration()
        self.kube_config.assert_hostname = False
    Configuration.set_default(self.kube_config)
    self.batch_v1 = kubernetes.client.BatchV1Api(kubernetes.client.ApiClient(self.kube_config))

    self.project_id = get_setting(setting="project_id",settings=settings)

    if os.environ.get('GOOGLE_CLOUD_PROJECT'): 
      self.project_id  = os.environ.get('GOOGLE_CLOUD_PROJECT') 
    if FLAGS.project_id:
      self.project_id = FLAGS.project_id