You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to reuse the configuration from the python-kubernetes client
In general it seems to work as I am getting authorized
While trying to call any argo endpoints I always get a NotFoundException. So it seems somehow/somewhere I need to alter a base_url or similar?
Maybe you can point me to other ways how to init the argo api_client?
importloggingimportkubernetes.configimportkubernetes.clientimportargo_workflowsfromargo_workflows.apiimportworkflow_service_apilog=logging.getLogger(__name__)
# Load inCluster or kubeconfigtry:
kubernetes.config.load_incluster_config()
exceptkubernetes.config.ConfigException:
# for local environmenttry:
kubernetes.config.load_kube_config()
exceptException:
log.error('No InCluster nor local kubeconfig. Most likely not running on Kubernetes at all')
raise# init kubernetes ApiClientk8s=kubernetes.client.ApiClient()
# steal the configuration from k8sconfiguration=argo_workflows.Configuration(
host=k8s.configuration.host,
api_key={"BearerToken": k8s.configuration.api_key.get('authorization')},
ssl_ca_cert=k8s.configuration.ssl_ca_cert,
)
# init api client and instanceapi_client=argo_workflows.ApiClient(configuration)
api_instance=workflow_service_api.WorkflowServiceApi(api_client=api_client)
# this throws argo_workflows.exceptions.NotFoundException# called URL was# https://something.gr7.us-east-1.eks.amazonaws.com/api/v1/workflows/argoapi_instance.list_workflows(namespace='argo')
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi community,
I am trying to reuse the configuration from the python-kubernetes client
In general it seems to work as I am getting authorized
While trying to call any argo endpoints I always get a
NotFoundException
. So it seems somehow/somewhere I need to alter abase_url
or similar?Maybe you can point me to other ways how to init the argo
api_client
?Beta Was this translation helpful? Give feedback.
All reactions