(self)
| 954 | return self._config |
| 955 | |
| 956 | def _get_api_client(self): |
| 957 | if self._api_client is not None: |
| 958 | return self._api_client |
| 959 | try: |
| 960 | config_file = self._config.kubernetes_launcher.config_file |
| 961 | self._api_client = resolve_api_client(config_file) |
| 962 | except kube_config.ConfigException as e: |
| 963 | raise RuntimeError( |
| 964 | "Kubernetes environment not found, you may want to" |
| 965 | ' launch session locally with param cluster_type="hosts"' |
| 966 | ) from e |
| 967 | return self._api_client |
| 968 | |
| 969 | def _ensure_pvc_exists(self, pvc_name, pvc_namespace): |
| 970 | _core_api = kube_client.CoreV1Api(self._get_api_client()) |
no test coverage detected