Try to load cluster config from service accounts too
@@ -87,6 +87,9 @@ class GitHubBuildHandler(web.RequestHandler):
user=user, repo=repo, ref=sha
).replace('_', '-').lower()
+ try:
+ config.load_incluster_config()
+ except config.ConfigException:
config.load_kube_config()
api = client.CoreV1Api()
