Skip to content

Commit 73b8cb7

Browse files
fix: skip_tls authentication functionality
Signed-off-by: Bobbins228 <[email protected]>
1 parent 0d445fe commit 73b8cb7

File tree

1 file changed

+5
-4
lines changed
  • src/codeflare_sdk/common/kubernetes_cluster

1 file changed

+5
-4
lines changed

src/codeflare_sdk/common/kubernetes_cluster/auth.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,15 @@ def login(self) -> str:
109109
configuration.host = self.server
110110
configuration.api_key["authorization"] = self.token
111111

112-
api_client = client.ApiClient(configuration)
113-
if not self.skip_tls:
114-
_client_with_cert(api_client, self.ca_cert_path)
115-
else:
112+
if self.skip_tls:
116113
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
117114
print("Insecure request warnings have been disabled")
118115
configuration.verify_ssl = False
119116

117+
api_client = client.ApiClient(configuration)
118+
if not self.skip_tls:
119+
_client_with_cert(api_client, self.ca_cert_path)
120+
120121
client.AuthenticationApi(api_client).get_api_group()
121122
config_path = None
122123
return "Logged into %s" % self.server

0 commit comments

Comments
 (0)