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

Add feature - Support existing secret to configure http_proxy and https_proxy #1823

Open
ClementJ35 opened this issue Sep 5, 2024 · 3 comments

Comments

@ClementJ35
Copy link

Hi,

Actually, all proxy settings are bond to values and deployed as env and envFrom configMaps.
As we want to hide username and password in our gitlab instance, we would like to use an existing secret that we could sync from external tools (as external secret operator).

I will make a PR soon, working here : https://github.com/ClementJ35/harbor-helm/tree/add-existing-secret-to-proxy

But first i would discuss how to implement it. I see two options :

  1. Break the existent and pass the HTTP_PROXY in a secret, generated by helm or provided by user.
  2. Use the existent env values and adapt it.

I'd say that as we have secret information, it should be a secret. But it will break possible third party tools used by persons to tweak pod environment variable and/or configmaps holding the proxy configuration.

Any income is welcome.

@ClementJ35 ClementJ35 changed the title Add feature - Support existing secret to configure http_proxy, https_proxy and no_proxy Add feature - Support existing secret to configure http_proxy and https_proxy Sep 6, 2024
@ClementJ35
Copy link
Author

After revision, it seems that no_proxy doesn't have to be secret. So I'm leaving it out of secret scope, notably because of insertion of local services made by helm charts helper : https://github.com/goharbor/harbor-helm/blob/main/templates/_helpers.tpl#L295

@MinerYang
Copy link
Collaborator

Could you give an example of your proxy url?

@ClementJ35
Copy link
Author

ClementJ35 commented Sep 9, 2024

The proxy is setup as a secret like this :

apiVersion: v1
kind: Secret
stringData:
  HTTP_PROXY: http://username:[email protected]
  HTTPS_PROXY: https://username:[email protected]

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

No branches or pull requests

2 participants