-
Notifications
You must be signed in to change notification settings - Fork 56
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
Helm repository not found #40
Comments
Welcome! argocd plugins execute in 2 phases, an |
Thanks for the quick response. Ah ok, so that clarifies where the repositories are supposed to be added. I'm only getting an error related to the generate command. ArgoCD doesn't seem to run the init command. I've on purpose modified my helmfile.yaml to produce an error when being processed by helmfile. I would expect ArgoCD to throw me an error that the init command failed because helmfile can't parse the helmfile.yaml file. Instead, I only again see the generate command. Do you have any ideas why the init command might not be called or how to go about debugging? |
I've added a custom (non-existent) init script via the environment variable. It does fail with a message telling me that the script does not exist, so that leads me to conclude that init is being called. But why the |
If any command in the plugin fails the script will exit. So the behavior actually makes sense because the custom init script is executed just before the helmfile repos command. |
Can you send over the application yaml and the version of the plugin currently in use? The only thing I can think of at the moment is there some logic error with the caching logic. |
Yeah I was also zooming in on the caching logic but couldn't find a good way to debug. This is the application YAML (redacted):
and the helmfile:
Plugin version: travisghansen/argo-cd-helmfile:latest (unfortunately not pinned to a specific version). Is there any way to get more debug logging? To double check that the |
Set |
As an intermediate finding I wanted to mention that creating a custom init script that calls the helmfile repos command actually solves the issue. This leads me to conclude that the helmfile repos command is not executed under normal circumstances. Just to validate: do you define repositories in the helmfile and do they work for you? This seems like the most basic of features so I would be surprised if it didn't work at all. I'll continue the investigation. |
I do define the repos in my set of helmfiles. Something is clearly strange in your scenario. Maybe you can exec into the plugin container and try to execute the command directly and debug that way? |
Ok, I figured out why it was failing. My helmfile commands require an environment to be passed as argument otherwise it will fail. I added the HELMFILE_TEMPLATE_OPTIONS environment variable with the required environment setting. I didn't realise until now that I needed to set the HELMFILE_GLOBAL_OPTIONS environment variable so that the I think what happens is, that the Shellcheck gives some information that might be useful: https://www.shellcheck.net/wiki/SC2015 Bash....so many subtle ways it might fail :-) I'll leave it to you if you want me to close this issue or that you want to try out my theory regarding the silent failure and potentially fix it with a straight-up if-then-else construct. |
This little snippet clarifies things:
It will both produce an error because the --tst argument is not recognized and echo "yo". It will then exit with a zero exit code, indicating all went well which is obviously not what you want. |
Yes! Thanks for pointing this out and great find! I'll get it cleaned up with something more appropriate. |
Fix here: 6299491 Wait for |
Hi,
First of all, great job on the ArgoCD / Helmfile integration. It has been working very smoothly for us.
Up until now we were using local directories for the Helm chart sources. This works like a charm but we need to move the locations over to our internal Helm registry proxy.
I've added a repository definition as described in the docs:
Next, in the release specification I use this repository for the Helm chart location:
When syncing this definition in ArgoCD it produces an error saying that Helm can't find the 'internal-registry' repository.
This repository needs to be added first before the template command can run successfully. In the source I noticed the
--skip-deps
argument: https://github.com/travisghansen/argo-cd-helmfile/blob/master/src/argo-cd-helmfile.sh#L408Is this preventing the repository from being added? If so, how do we deal with this? If not, any suggestions why the repository might not be added before the template command?
Thanks!
The text was updated successfully, but these errors were encountered: