travisghansen / argo-cd-helmfile

Integration between argo-cd and helmfile
MIT License
221 stars 56 forks source link

Unable to do create new app using helmfile #10

Closed yagya23 closed 3 years ago

yagya23 commented 3 years ago

I am using helmfile plugin additionally i have also installed helm secrets plugin, imported gpg key as well that is all working fine. I am unable to create app in argo cd with below error:

Unable to create application: application spec is invalid: InvalidSpecError: Unable to generate manifests in wnccloud/releases: rpc error: code = Unknown desc = Manifest generation error (cached): failed to unmarshal manifest: error converting YAML to JSON: yaml: line 6: mapping values are not allowed in this context

However, i do helmfile sync on my k8s cluster, I am not getting any such type of issue.

I am giving path of repositry till releases folder ex: myrepo/releases

Using plugin helmfile with parameter

RELEASE mydemorelease

@travisghansen

travisghansen commented 3 years ago

Can you send over the application spec you’re trying to use?

yagya23 commented 3 years ago

Below is the tree structure.

[acme@aks-worker myproj]$ tree . . ├── deployment-tool │   └── deployment-tool.tar.gz ├── ingress │   ├── Chart.lock │   ├── charts │   │   └── nginx-ingress-1.27.2.tgz │   ├── Chart.yaml │   ├── README.md │   ├── templates │   │   ├── _helpers.tpl │   │   ├── ingress.yaml │   │   └── tls-secret.yaml │   ├── values.schema.json │   └── values.yaml ├── myapp │   ├── Chart.lock │   ├── Chart.yaml │   ├── config │   │   └── mycustom.properties │   ├── README.md │   ├── templates │   │   └── my-deployment.yml │   ├── values.schema.json │   └── values.yaml ├── README.md └── releases ├── acme │   ├── config │   │   └── mycustomwt.properties │   ├── secrets │   │   └── secrets-properties.yaml │   └── values.yaml.gotmpl └── helmfile.yaml

I am running it with my helmfile plugin with helm secrets installted in my custom image.

Giving RELEASE=acme here. It should take values from releases/acme/values.yaml.gotmpl file and refer other values from myapp/templates.

This is working file when i am doing helmfile sync on my local setup, but it is breaking using argocd ui.

travisghansen commented 3 years ago

Does the application actually exist in argocd? I’m not clear if you’ve even made it past that point based on the error message.

If so I would suggest replicating the helmfile template command locally to make sure that works outside of the cluster with your charts etc

yagya23 commented 3 years ago

No the application doesnt exist in argocd. I am trying to create in argocd it. In my AKS environement when i do helmfile sync my application works fine. But same application is not working using argocd.

travisghansen commented 3 years ago

Can you successfully run helmfile template manually?

yagya23 commented 3 years ago

yes.

yagya23 commented 3 years ago

@travisghansen Any updates ?

travisghansen commented 3 years ago

I'm not sure what to tell you on this one. Can you send the yaml definition of the argocd application to review? @mumoshu any thoughts here?

yagya23 commented 3 years ago

apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: acme spec: destination: name: '' namespace: acme server: 'https://kubernetes.default.svc' source: path: wnccloud/releases repoURL: 'https://gitrepourl' targetRevision: HEAD plugin: name: helmfile env: