oauth2-proxy / manifests

For hosting manifests to allow for the deployment of OAuth2-Proxy/OAuth2-Proxy
Apache License 2.0
170 stars 153 forks source link

Add proxyVarsFromSecret: "" option #141

Closed jan-brychta closed 6 months ago

jan-brychta commented 1 year ago

added option to load OAUTH2_PROXY variables directly from a secret

Reasoning ExternalSecrets with GitLab provider makes this chart really hard to use, since you cannot name a GitLab CI/CD variable using "-" such as cookie-secret.

pierluigilenoci commented 1 year ago

@jan-brychta the proxyVarsAsSecrets is not already enough? Ref: https://github.com/oauth2-proxy/manifests/blob/main/helm/oauth2-proxy/templates/deployment.yaml#L122-L138

jan-brychta commented 1 year ago

@pierluigilenoci Not really, that's why I have provided a reasoning beforehand.

proxyVarsAsSecrets forces you to have the keys in the form of client-id, client-secret and cookie-secret which is then passed to a variable OAUTH2_PROXY_whatever anyway. In my opinion, it's unnecessarily complicated.

In our case, we store this secret in GitLab CI/CD variables from where it is synced directly into the cluster. And you cannot name a variable with - there, as I mentioned before.

pierluigilenoci commented 1 year ago

@jan-brychta is OK; I got it.

You could document it better in the PR so that the difference with the other option is apparent to those using the chart. And maybe a test. In addition, the chart version also needs a bump.

jan-brychta commented 1 year ago

Alright, thanks for the heads up @pierluigilenoci

jan-brychta commented 1 year ago

@pierluigilenoci @desaintmartin Hey, would you mind sparing a moment to give me a hand with this? I'd really appreciate it!

pierluigilenoci commented 1 year ago

@jan-brychta , I'm not sure what you want from us. Let me explain it again.

What I asked you to integrate into your PR are two points:

Concerning the PR probably also missing a change to the file that generates the secret.

pierluigilenoci commented 1 year ago

@jan-brychta, I tagged you in the last comment wrong, so I wonder if you received a notification. I do it again in another comment just to be safe.

pierluigilenoci commented 1 year ago

@jan-brychta, could you please revisit your PR? Ref: https://github.com/oauth2-proxy/manifests/pull/141#issuecomment-1547423378

aslafy-z commented 9 months ago

@pierluigilenoci Can you please fix the deployment by moving the envFrom outside of env? I think the envFrom needs to be gated too. If you prefer, I can open a new PR with the required changes. Thank you.

pierluigilenoci commented 8 months ago

@aslafy-z please feel free to open a PR to address that.

pierluigilenoci commented 8 months ago

@jan-brychta, could you please revisit your PR?

aslafy-z commented 8 months ago

@pierluigilenoci I meant https://github.com/oauth2-proxy/manifests/pull/141/files#r1506261867

aslafy-z commented 8 months ago

Please note that it should be moved out of the env: block (before line 145 for eg.)

aslafy-z commented 8 months ago

My comment https://github.com/oauth2-proxy/manifests/pull/141#issuecomment-1969520087 is still to be addressed image

pierluigilenoci commented 8 months ago

@aslafy-z, you must ask @jan-brychta to address your comments.

pierluigilenoci commented 7 months ago

@aslafy-z or @jan-brychta, could you please take a look and try to push forward the PR?

aslafy-z commented 7 months ago

This PR has little value to me. However, I opened #196 with the envFrom placement fixed. I closed it, feel free to re-open it if you want to proceed with it and add tests & mention in the readme. If no answer is received from @jan-brychta, I think you can close this PR too.

pierluigilenoci commented 6 months ago

Closed in favor of #196

jan-brychta commented 6 months ago

Appologies @pierluigilenoci, got busy with other project... Thanks for taking over @aslafy-z !