def client(self):
cls = self.__class__
if cls._client is None:
if self.verify_ssl is False:
import requests
requests.packages.urllib3.disable_warnings()
import urllib3
urllib3.disable_warnings()
if self.username and self.password:
self.log.debug("Creating Kubernetes client from username and password")
cls._client = KubernetesClient.from_username_password(self.host, self.username, self.password,
verify_ssl=self.verify_ssl)
else:
self.log.debug("Creating Kubernetes client from Service Account")
cls._client = KubernetesClient.from_service_account(self.host, verify_ssl=self.verify_ssl)
return cls._client
spawner.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录