diff --git a/src/codeflare_sdk/cluster/cluster.py b/src/codeflare_sdk/cluster/cluster.py index ff92bfcf0..a1afc1580 100644 --- a/src/codeflare_sdk/cluster/cluster.py +++ b/src/codeflare_sdk/cluster/cluster.py @@ -429,7 +429,7 @@ def get_cluster(cluster_name: str, namespace: str = "default"): def _get_ingress_domain(): try: config.load_kube_config() - api_client = client.CustomObjectsApi() + api_client = client.CustomObjectsApi(api_config_handler()) ingress = api_client.get_cluster_custom_object( "config.openshift.io", "v1", "ingresses", "cluster" ) diff --git a/src/codeflare_sdk/utils/generate_yaml.py b/src/codeflare_sdk/utils/generate_yaml.py index c4361abae..6592001eb 100755 --- a/src/codeflare_sdk/utils/generate_yaml.py +++ b/src/codeflare_sdk/utils/generate_yaml.py @@ -23,6 +23,7 @@ import uuid from kubernetes import client, config from .kube_api_helpers import _kube_api_error_handling +from ..cluster.auth import api_config_handler def read_template(template): @@ -251,7 +252,7 @@ def enable_local_interactive(resources, cluster_name, namespace): command = command.replace("deployment-name", cluster_name) try: config.load_kube_config() - api_client = client.CustomObjectsApi() + api_client = client.CustomObjectsApi(api_config_handler()) ingress = api_client.get_cluster_custom_object( "config.openshift.io", "v1", "ingresses", "cluster" )