Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to include ssl_sa_certs via env vars for kfp_tekton client #3150

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/source/user_guide/runtime-conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ The KubeFlow Pipelines API endpoint you want to utilize. This setting is require

Example: `https://kubernetes-service.domain.com/pipeline`

*Note*: In setups where the Kubeflow Pipeline server is secured with a custom certificate, users can specify this certificate path by setting the environment variable `KF_PIPELINES_SSL_SA_CERT` in the jupyter environment. This variable directs the Kubeflow Pipelines SDK client to use the provided certificate for accessing the Kubeflow Pipeline server. For more information, see the [ssl_ca_cert](https://kubeflow-pipelines.readthedocs.io/en/stable/source/client.html#kfp.client.Client.__init__.ssl_ca_cert) attribute in the `kfp` SDK documentation.
Ex: `KF_PIPELINES_SSL_SA_CERT:/path/to/certs`


##### Public Kubeflow Pipelines API endpoint (public_api_endpoint)

Expand Down
2 changes: 2 additions & 0 deletions elyra/pipeline/kfp/kfp_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ def authenticate(
"""

kf_url = urlsplit(api_endpoint)._replace(path="").geturl()
kf_pipelines_ssl_sa_cert = os.getenv("KF_PIPELINES_SSL_SA_CERTS", None)

# return data structure for successful requests
auth_info = {
Expand All @@ -239,6 +240,7 @@ def authenticate(
"cookies": None, # passed to KFP SDK client as "cookies" param value
"credentials": None, # passed to KFP SDK client as "credentials" param value
"existing_token": None, # passed to KFP SDK client as "existing_token" param value
"ssl_ca_cert": kf_pipelines_ssl_sa_cert, # passed to KFP SDK Client as "ssl_ca_cert" param value
}

try:
Expand Down
1 change: 1 addition & 0 deletions elyra/pipeline/kfp/processor_kfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def process(self, pipeline):
credentials=auth_info.get("credentials", None),
existing_token=auth_info.get("existing_token", None),
namespace=user_namespace,
ssl_ca_cert=auth_info.get("ssl_ca_cert", None),
)
else:
client = ArgoClient(
Expand Down
Loading