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

feat: add HTTPSProxy to env var #678

Merged
merged 4 commits into from
Feb 22, 2022
Merged

feat: add HTTPSProxy to env var #678

merged 4 commits into from
Feb 22, 2022

Conversation

hubeadmin
Copy link
Collaborator

Description

  • adds new configuration options for secure http proxy env vars to be used when downloading plugins

Relevant issues/tickets

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • This change requires a documentation update
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a test case that will be used to verify my changes
  • Verified independently on a cluster by reviewer

Verification steps

@hubeadmin
Copy link
Collaborator Author

#676 @bukovjanmic can you take a look at this and see if this fixes your issue?

@bukovjanmic
Copy link

Looking at the PR, it seems this would fix the problem.

Although maybe unnecessarily complicated, I would leave out the Secure parametr and leave only URL and secureURL params. If URL is non-empty (and proxy enabled), HTTP_PROXY is generated. If secureURL is non-empty, HTTPS_PROXY is enabled.

Maybe another thought - since the plugins are always downloaded from https (it is hardcoded in the plugin image, I believe), we always need HTTPS_PROXY, so it should be either mentioned in documentation or maybe an error should be printed out if a plugin needs to be downloaded and secureURL is not defined.

Also, it would be nice if the pkugins could be cached in a PVC (e.g. enable PVC mount to plugin downloader and skip download if plugins are already present there. This would result in faster startup and also safer, as Grafana would start even if proxy or outside internet connection is not available. But I guess this is for a different issue.

Thanks,

Michal

@hubeadmin
Copy link
Collaborator Author

Looking at the PR, it seems this would fix the problem.

Although maybe unnecessarily complicated, I would leave out the Secure parametr and leave only URL and secureURL params. If URL is non-empty (and proxy enabled), HTTP_PROXY is generated. If secureURL is non-empty, HTTPS_PROXY is enabled.

Maybe another thought - since the plugins are always downloaded from https (it is hardcoded in the plugin image, I believe), we always need HTTPS_PROXY, so it should be either mentioned in documentation or maybe an error should be printed out if a plugin needs to be downloaded and secureURL is not defined.

Also, it would be nice if the pkugins could be cached in a PVC (e.g. enable PVC mount to plugin downloader and skip download if plugins are already present there. This would result in faster startup and also safer, as Grafana would start even if proxy or outside internet connection is not available. But I guess this is for a different issue.

Thanks,

Michal

@bukovjanmic thanks for the feedback, I'll get back on this ASAP, as for the PVC cache, yeah I would consider that a separate issue

@hubeadmin hubeadmin force-pushed the https-proxy branch 2 times, most recently from 5ea9e4d to a8c7f6b Compare February 9, 2022 19:41
@hubeadmin
Copy link
Collaborator Author

@bukovjanmic How does this update look? If you'd like me to, I can generate an operator image and some manifests for you to try it out on your setup?

@bukovjanmic
Copy link

Yes, looks good.

If there is an image, I can test it, as there is a way to override default image.

@pb82 pb82 merged commit 97f526b into grafana:master Feb 22, 2022
@hubeadmin hubeadmin deleted the https-proxy branch October 16, 2023 10:01
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