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

Adding Proxy settings for private clusters #9

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

paigerube14
Copy link
Collaborator

Changes introduced with this PR

Adding changes that allow private clusters to use this plugin


By contributing to this repository, I agree to the contribution guidelines.

@@ -13,20 +16,39 @@
from kubernetes.client import ApiException, V1DeleteOptions, V1Pod, V1PodList


urllib3.disable_warnings()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these warnings disabled? Please add a comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And disabling all warnings is a path leading to not understanding bad behavior.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove, found how to update without needing this on a similar PR

I have made some updates but not successfully gotten things running on a private cluster

http_proxy = os.getenv("http_proxy", None)
"""Proxy has auth header"""
if http_proxy and "@" in http_proxy:
proxy_auth = http_proxy.split("@")[0].split("//")[1]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use proper URL parsing instead of splitting the http_proxy. @ signs are valid components of usernames and passwords when escaped.

@@ -13,20 +16,39 @@
from kubernetes.client import ApiException, V1DeleteOptions, V1Pod, V1PodList


urllib3.disable_warnings()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And disabling all warnings is a path leading to not understanding bad behavior.

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