argocd applicationset template with values from helm

182 views Asked by At

I'm using argocd applicationset template of git folder generator, where's each folder is a helm chart. I want to add annotation to the application from the values of the folder's chart. for example i have a folder named "annotations" with values file:

...
global:
  team: dns

i want to add to the applicationset template the .global.team value:

  template:
    metadata:
      name: 'development-{{path.basename}}'
      annotations:
        itai-test: '{{ .Values.global.team }}'

is it possible? how can I do it?

I tried using merge generator of git files and git folders like this and it didn't work (no error occurred, just didn't do what I was expecting....) added path.basename to the values.yaml of the folder

spec:
  generators:
  - merge:
      mergeKeys:
      - path.basename
      generators:
      - git:
          repoURL: my-repo.git
          revision: HEAD
          directories:
          - path: '*'
      - git:
          repoURL: my-repo.git
          revision: HEAD
          files:
          - path: '{{path}}/values.yaml'
0

There are 0 answers