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

fix: handle cases when running inside a kubernetes cluster #17

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

bilalshaikh42
Copy link
Contributor

@bilalshaikh42 bilalshaikh42 commented Apr 2, 2024

The current setup for the plugin assumes that we have a kubeconfig file used to connect to the cluster. However, this is not the case if the code submitting the job is itself running in a pod in the cluster, as we will need to use the default service account provided by the cluster. This modifies the init to catch any errors when loading a kubeconfig file and use the incluster configuration instead

The issue in the python kubernetes client here describes the problem:
kubernetes-client/python#1005

The current setup for the plugin assumes that we have a kubeconfig file used to connect to the cluster. However, this is not the case if the code submitting the job is itself running in a pod in the cluster, as we will need to use the default service account provided by the cluster 
This modifies the init to catch any errors when loading a kubeconfig file and use the inlcuster configuration instead
@johanneskoester johanneskoester merged commit a031314 into snakemake:main Aug 14, 2024
1 check passed
@johanneskoester
Copy link
Contributor

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants