Closed cwusyscrest closed 3 years ago
Glad it's helping out! What is the error you got? I'm guessing it's blowing up due to the quoting style you're using...remove either the single or double quotes but don't use both.
@travisghansen Thanks for your quick response. I tried to remove the single quotes and still the env variable wasn't there.
But if I ran helmfile -e development template
, the manifests were rendered correctly with the values specified in environments/development/values.yaml
.
Ok so I tried to add the HELMFILE_GLOBAL_OPTIONS env variable from ArgoCD ui, and it worked.
Maybe it was due to the fact that my application.yaml wasn't put in the right place. Is there any way to set the environment variable just like
--helm-set environment=something
in argocd with helm?
That value in the image still looks incorrect no? Looks like you have an empty env var name with an empty value?
I'm not entirely sure I understand your question. Can you elaborate a bit more?
Sure so my question is rather simple.
I wanted to know if it is possible to set the env variable (e.g. HELMFILE_GLOBAL_OPTIONS) when I create an argocd app with argocd cli. For example, with helm we can do
argocd app create APPNAME --helm-set-string 'app=${ARGOCD_APP_NAME}'
Can we set the env variable like HELMFILE_GLOBAL_OPTIONS as helm does with argocd cli?
At the moment, I think the only way is to write my own application manifest my-app.yaml
for example, and then run kubectl apply -f my-app.yaml
to deploy the argocd app. And I need to set HELMFILE_GLOBAL_OPTIONS in my-app.yaml
.
Ah got ya! I’m not sure actually. I don’t use the cli but if not that’s certainly a case where a bug should be created. I’ll look at docs though and see what I can find.
Looking at the doc it appears so. The last example in the link shows creating an app using a custom plugin and then further down you’ll see doc for the plugin-env
option.
Thanks @travisghansen I tried the plugin-env
option, but it didn't work on my side. I will simply go for using kubectl apply on the application manifest. Thank you again for your help.
Figure out a solution?
At the time of writing no, but I will investigate further on the plugin-env
option. If i have any solution, I will post it here again.
Hi,
Thank you for developing such a great plugin for helmfile. I was wondering what I did wrong if I want to achieve something like
helmfile --environment development apply
.Here is my application manifest:
Here is structure of the example project:
So basically what I want to achieve here is that I want to specify
--environment
in order to tell helmfile which values.yaml to take when rendering the manifest. Thank you!