argo-cd: argoCD does not deploy helm dependencies

If you are trying to resolve an environment-specific issue or have a one-off question about the edge case that does not require a feature then please consider asking a question in argocd slack channel.

Checklist:

  • I’ve searched in the docs and FAQ for my answer: http://bit.ly/argocd-faq.
  • I’ve included steps to reproduce the bug.
  • I’ve pasted the output of argocd version.

Describe the bug

Defining dependencies with values.yaml file for app, argoCD does not deploy dependency. With helm only dependency is pulled down and installed. Charts.yaml for application is:

dependencies:
- name: mongodb-replicaset
    version: 3.9.5
    repository: "@stable"
    alias: mongo
    condition: mongo.enabled
    ========
    value file has:
    mongo:
  image:
    tag: "4.0"
  replicas: 3
  metrics:
    enabled: true
    prometheusServiceDiscovery: true
  extraLabels:
    openvpn: inbound
  affinity:
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        - topologyKey: "kubernetes.io/hostname"
          labelSelector:
            matchLabels:
              app: mongo 

To Reproduce

Create a app and chart.yaml define mongoDB as dependency

Expected behavior

Instance of mongoDB is installed together with application

Screenshots

NA

Version

argocd: v1.4.2+48cced9
  BuildDate: 2020-01-24T01:07:43Z
  GitCommit: 48cced9d925b5bc94f6aa9fa4a8a19b2a59e128a
  GitTreeState: clean
  GoVersion: go1.12.6
  Compiler: gc
  Platform: darwin/amd64
argocd-server: v1.4.2+48cced9
  BuildDate: 2020-01-24T01:07:03Z
  GitCommit: 48cced9d925b5bc94f6aa9fa4a8a19b2a59e128a
  GitTreeState: clean
  GoVersion: go1.12.6
  Compiler: gc
  Platform: linux/amd64
  Ksonnet Version: v0.13.1
  Kustomize Version: Version: {Version:kustomize/v3.2.1 GitCommit:d89b448c745937f0cf1936162f26a5aac688f840 BuildDate:2019-09-27T00:10:52Z GoOs:linux GoArch:amd64}
  Helm Version: v2.15.2
  Kubectl Version: v1.14.0.

Logs

Paste any relevant application logs here.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 23
  • Comments: 54 (4 by maintainers)

Commits related to this issue

Most upvoted comments

+1 on this issue

I’m having a similar issue but with dependencies of sub-charts. My app is structures like this:

umbrella chart
   +--- component chart
       +---- mongodb dependency

What I observe is that ArgoCD thinks all is green and up-to-date, but the mongodb manifests are simply no there. Checking in the charts directory, works around it.

I ran into this too. I found that ArgoCD will deploy the dependencies if the dependencies are added to requirements.yaml instead of chart.yaml. So this is still a bug but it isn’t as annoying as it looks at first.

Hopefully this saves someone the time I spent looking for a more complex workaround.

Same here. Works only if you do ‘helm dependency update’ in your chart folder before uploading stuff. Is not ideal because you have to push the chart to the git repository containing your app, but works.

@KlavsKlavsen correct, seems to be that way.That is also why uploading the charts/ subfolder along with an argocd project works. Shouldn’t be necessary though, you normally don’t want to pollute your git repos with tar.gz archives.

Every application is now going OK when I choose ‘hard refresh’ manually. The fix for this would seem to be something like:

  1. ensure “Helm result cache” is NOT long lived… “positive cache” may live as long as git repo has not changed, but for sync - negative results should NOT live for more than a few minutes at max as they seem to hit some Helm issue which then needs manually hard refresh on every application.
  2. Helm appearently messes up its cache on times… so on negative Helm results - you should probably do this inside the pod: rm -rf ~/.helm/cache/archive/* rm -rf ~/.helm/repository/cache/* helm repo update

which is what I “get” by killing pods, when changing replicas.

It seems the down arrow is just VERY HARD to hit precisely - and hence if oftens selects ‘refresh’ instead of showing the ‘hard refresh’ option 😃

Should be like that, yes.