-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
new multiple sources doesn't work with helm-secrets #11866
Comments
To clarify the example to reproduce, you have |
Oh sorry, it's only in the examples, I have sources inside my real yaml file |
@morey-tech Hey, so just to clarify, it seems that the fix will not be included in the 2.6 release ? |
Based on #11966 (comment), unfortunately, it looks that way. As a beta feature, there may be edge cases that aren't supported yet, and Helm Secrets happen to be a victim of that. Unless someone has time to figure out the solution and properly test it before the 2.6 release on 2023-02-06, it'll have to wait for 2.7 around 2023-04-10 or there is "some hope for including it in a patch release" |
Hi, We want to use helm-secrets with sops backend + multi sources app. From the following documentation, we understand that the limitation lives on Argo CD side. Should we wait for 2.7 release? |
Ping @todaywasawesome, greetings from KubeCon. |
Hi there folks, Is this still on track for 2.7? :) |
It seems like that this issue can be resolved by #12508 @ishitasequeira Did you see any chance that the PR will be merged into 2.7? |
@jkroepke Thanks for reaching out.. I have reviewed the PR!! Looking for another eyes from the approvers to get it merged. |
2.7.0 is released but multi source still doesn't work with helm-secrets. Does anyone have any updates on this ? |
@egoist777 #12508 is not merged, nothing changed in 2.7.0 in terms of this. |
@jkroepke I see... |
Any updates when this will get merged ? |
Seems it's just waiting for an extra reviewer, similar to pre-2.7. Any help testing the feature of course helps get things through quicker! |
Any updates? |
Soon 2.9.0 will be out. Is there any plans for this? Being able to use encrypted values.yaml is curcial IMHO. I am a bit confused, because helm-secrets people mention here that there is a limitation, and this is shown here in this issue. However, there is an example shown which supposes that it should work. I am talking about this: Multi-Source Application Support [BETA]
and after this text in the same page they provided an example with multi-source application. Could any one tell me what is going on? Or what is the status of this limitation that I don't really understand. |
PR #12508 is likely something that we are looking for, but its getting staled |
@MohammedNoureldin I'm not sure how that workaround is supposed to work or why it might fail... Maybe they have a custom Argo CD image which supports those env vars? Re: #12508, it's not stale, I just haven't had time to give it a final review and get it merged yet. |
Thank you for your reply, @crenshaw-dev and @jkroepke. |
I think that env is for helm-secrets that would by default reject an absolute path, not argo. Meanwhile 1 week into testing argocd I already hit this limitation too, only because the substitution assumes that the string must start with $ref. The simplest method for me would be to allow ref substitution (in helm plugin) using both a file path or an URI style reference, without touching the scheme to allow for arbitrary plugins (secrets://). And limit the substitution to the first match after the scheme. |
As plugin maintainer, i'm open to any reachable solution. |
Yeah I wrote up a small proposal on another issue about how we could do ref substitution on secret values. At the time it seemed gnarlier than the solution of sharing arbitrary files, but now I'm thinking that calculus might have been wrong. |
Whats is the issue with allow to substitute the $ref after the protocol handler |
@egoist777 We're currently using a Helm SubChart method as a workaround, and we actually prefer it to the proposed Multi-App solution. Though, of course, won't work for all cases. Here's a gist that covers our setup. |
I also think the best solution is to have that simplest solution, that can easily unblock most use cases. Namely the usage of charts in external helmrepos with value files from git. If arbitrary files were a problem i would think that the repos should be cloned to a single app folder and a chroot used to prevent references outside the scope (app, generator,etc). |
Path traversal, the bane of the repo-server. :-P Substituting $ref at the beginning of a valuesFile path is safe and easy, because we know exactly how Helm uses that path, and we can scrub the sensitive, not-to-be-leaked path from error messages. Substituting in an arbitrary position in the path means that we can no longer be confident that we're successfully scrubbing that path from all error messages or other output. I think values file substitution should be implemented in a different way: #11966 (comment) Instead of substituting the $ref variable with the file's home repo path, we should copy the file out to a new, randomized path and substitute that new, short-lived path into the value file path. We don't care if the path gets leaked, because it'll be deleted by the time anyone sees it. |
@crenshaw-dev Based on the very thoughtful and appreciated response in #12508 (comment) |
@jwitko I think there's still a path forward for helm-secrets. I think that something like what I've described at the bottom of this comment #11966 (comment) might be viable. I worry about the URL parsing part, but maybe that's not as tricky as it seems in my head. |
Yeah, this works! Nice find. |
Thanks. It worked for me.This is what I did
- name: HELM_SECRETS_VALUES_ALLOW_ABSOLUTE_PATH
value: "true"
- name: HELM_SECRETS_WRAPPER_ENABLED
value: "true"
|
This works for me too. Thank you.
When we use the secrets:// prefix and do not have envvars HELM_SECRETS_VALUES_ALLOW_ABSOLUTE_PATH and HELM_SECRETS_WRAPPER_ENABLED, then newline is passed to the kubernetes secret template ( If we add
then the secrets are also decrypted even without the prefix secrets:// , but it turned out that the value of the variable gets into the secret without the last newline symbol. Tried to pass a few additional newline characters at the end and use Of course, I have a workaround to add an additional newline in the secret's helm template ( I did not find any mention of such a bug in sops "issues". |
Use
to strip newline at end. |
We need to save the newline if it exists. |
Hello, I'm still unable to use sops backend with GCP KMS on multi source apps. |
I finally managed to make it work, i share here what was wrong in my configuration : jkroepke/helm-secrets#475 |
Checklist:
argocd version
.Describe the bug
When using as values files in helm application with secrets, using the "secrets+age-import:///age-secret-key/keys.txt" file uri, the ref is not replaced with the file path.
To Reproduce
Expected behavior
ArgoCD should replace $config by the directory path
Screenshots
Version
Logs
The text was updated successfully, but these errors were encountered: