2

We are trying to start using Argocd to manage our k8s cluster. For the migration we have a single helm chart that we use for multiple microservices. To do a POC of the migration we have created a new repo that contains the chart and all the value files it will use. When declaring the App manifest for Argo we did this:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: app-develop
  namespace: argocd
spec:
  project: default
  source:
    repoURL: 'https://user@github.org/repos/repo.git'
    path: php-microservice
    targetRevision: HEAD
    chart: php-microservice
    helm:
      valueFiles:
        - values/app/develop/values-1.yml
        - values/app/develop/values-2.yml
        - values/app/develop/values-3.yml
      parameters:
        - name: app
          value: app-develop
  destination:
    server: 'https://kubernetes.default.svc'
    namespace: default
  syncPolicy:
    syncOptions:
      - CreateNamespace=true

This is the folder structure we have:

php-microservice/
├── templates/
├── values/
│   └── app/
│       └── develop/
│           ├── values-1.yml
│           ├── values-2.yml
│           └── values-3.yml
├── Chart.yml
├── .helmignore
└── values.yml

Each values file inside app/develop corresponds to the values file of one app.

Our problem is that Argo doesn't seem to recognize multiple files but just the last one. For any given deployment we have tried, only the last specified file is loaded and the rest is ignored. We have changed the order and we change the deployment, but we only see the k8s objects from the last file. Are we missing something here? Does Argo only support a single values.yaml per chart?

rock'n rolla
  • 1,883
  • 1
  • 13
  • 19
KarlsMaranjs
  • 311
  • 1
  • 9
  • 1
    Consider opening an issue on their GitHub with a minimal reproduction case. – Gaël J Apr 15 '23 at 17:55
  • What are you trying to achieve? Deploy three `php-microservice` instances? If that is the case, you need three `Application` definitions, each pointing to a different values file. What you are doing here is doing the equivalent of merging the values from top to bottom in order to the deploy your microservice. – HiroCereal Apr 20 '23 at 11:28
  • @HiroCereal sorry for the confusion. `php-microservice` is the name of the chart. What we are trying to achieve is to run multiple microservices using one Argo app. Say we have an App that needs 4 microservices to run. Each microservice has his own values.yaml and all of them are deployed using the same chart. – KarlsMaranjs May 02 '23 at 13:38
  • Then you either create one ArgCD `Application` for each microservice, or rewrite the chart so it can spawn more than one microservice – HiroCereal May 03 '23 at 14:09

1 Answers1

0

from my experience argo use values.yaml by default. you can chose in the UI wich values to use if you put all of them in the root repo of the chart and pick the one you want to use when creating argo app in the helm part chose values files.