-
Notifications
You must be signed in to change notification settings - Fork 114
feat: secretKeyRef support in extraProcEnvVars #1150
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
base: main
Are you sure you want to change the base?
feat: secretKeyRef support in extraProcEnvVars #1150
Conversation
Signed-off-by: Ion Koutsouris <[email protected]>
ba9c418
to
ea2db0c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, did you consider alternatives like
- Introduce another flag dedicated for secretRef
- Add support for
valueFrom
at extraEnvVars of helm level to match the Kubernetes API - Pass the secretRefs from the helm into the new dedicated flag for secretRef
- Pass the secretRef as-is into the pod template
That way, we could avoid conflating everything in the comma separate stuff like the current one. Manual parsing like this seems an error-prone and looks clunky to be honest.
wdyt?
ps thanks for working on this |
I didn't want to change to much beyond what I did now, since I didn't know how big of a change was acceptable. Option 2 would definetely solve the error prone issue, because we would know how valueFrom gets converted into a string and decoded again. The main issue is we have to go through this string structure, not sure if i'ts possible otherwise since I don't know the codebase well enough, but can definetly work another approach |
@ion-elgreco let me know if you have any intent to continue this PR or cool with closing this one since it's been a while since last activity |
@mathetake yes, I would like to but have to find some time |
Description
Allows references secrets in the ext_proc env vars as a value:
secretKeyRef {"name":"secret_name", "key": "secret_key"}
Complete example:
OTEL_EXPORTER_OTLP_HEADERS=secretKeyRef {"name":"secret_name", "key": "secret_key"}
This should also enable layering secrets with k8s, so you can configure you values.yaml this way for aigw, where secret_key is just the plain secret and then OTEL_EXPORTER_OTLP_HEADERS adds Bearer as prefix, while taking $SECRET_HEADER from the env var:
cc @codefromthecrypt, @mathetake