1Password / connect-helm-charts

Official 1Password Helm Charts
https://developer.1password.com
MIT License
93 stars 74 forks source link

Proxy Support or custom env #152

Closed lucidph3nx closed 8 months ago

lucidph3nx commented 1 year ago

Summary

When operating behind a corporate web proxy, I need to be able to set environment variables on my containers like https_proxy, http_proxy, no_proxy. These instruct most Linux applications that they should send requests via a specified proxy on their way out to the internet.

Use cases

When operating behind a corporate web proxy, all traffic is required to go via the web proxy for security reasons and no other route out of the network exists. I feel like there would be a non zero number of 1Password connect users who are wanting to make this scenario work. I'm quite surprised I'm the first issue mention.

Proposed solution

The helm template for the connect-deployment doesn't allow for any values to be added to environment variables for the containers. I needed to add the 3 mentioned above. You could either allow in the values, for custom environment variables to be added and append these to the bottom of the env variable lists for the containers, or do something more structured for just my use case. I think allowing custom env variables is fine, but I realise this could have security implications that I am missing.

Is there a workaround to accomplish this today?

As as result of not being able to accomplish this using your helm chart, I've had to use your containers in a generic application chart which has a lot more management overhead for me.

References & Prior Work

I've never done a template like this myself, but I have applied my own env to a number of other helm charts and its been able to handle it ok. I went digging and the first to pop up in my config was datadog, which (although a messy complicated chart) has this include statement in the template which gives an idea of how it could work. https://github.com/DataDog/helm-charts/blob/e3133172449038caaca4c18342fecd2976be377a/charts/datadog/templates/cluster-agent-deployment.yaml#L297

Matthiasvanderhallen commented 1 year ago

We are facing with the same issue, and are very interested in its resolution.

jimmi4u commented 1 year ago

We too are facing the same problems, and are very interested in their resolution. Is a solution availible already? Wolud be indeed very nice!

volodymyrZotov commented 8 months ago

Implemented in #182

NotABugItsAFeature commented 5 months ago

I've just noticed that the env variables are only applied on the connect-api container of the onepassword-connect pod. It's not applied on the connect-sync container. There's no customEnvVars specifically for each of those containers so I had expected it to be applied on both.