Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argocd applicationset-controller 2.9.0 toYaml function not defined #16280

Closed
sdomula opened this issue Nov 8, 2023 · 3 comments
Closed

argocd applicationset-controller 2.9.0 toYaml function not defined #16280

sdomula opened this issue Nov 8, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@sdomula
Copy link

sdomula commented Nov 8, 2023

Describe the bug

When using the new toYaml function with argocd 2.9.0 in an applicationset to include the values for a helm chart argocd-applicationset-controller logs an error that toYaml is not defined.

To Reproduce

I applied the following argocd appliationset (I removed sensitive information):

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: myset
  namespace: argocd
spec:
  goTemplate: true
  generators:
  - git:
    ...
  template:
    metadata:
      name: 'myset.{{ index .path.segments 1 }}'
    spec:
      project:  'myproject'
      source:
       ....
        helm:
          releaseName: 'myrelease'
          values: |
            {{ .values | toYaml }}

I am using the git generator and have, e.g., the following config file for the application set:

values:
  key: value
  nested:
    anotherKey: value

Expected behavior

It should create an appliation where it sets the values in the following way:

...
helm:
  releaseName: 'myrelease'
  values: |
    key: value
    nested:
      anotherKey: value

Version

I used the argocd helm chart (5.51.0) to install argocd

argocd: v2.9.0+9cf0c69.dirty
  BuildDate: 2023-11-06T15:13:36Z
  GitCommit: 9cf0c69bbe70393db40e5755e34715f30179ee09
  GitTreeState: dirty
  GoVersion: go1.21.3
  Compiler: gc
  Platform: darwin/amd64
argocd-server: v2.9.0+9cf0c69
  BuildDate: 2023-11-06T04:43:50Z
  GitCommit: 9cf0c69bbe70393db40e5755e34715f30179ee09
  GitTreeState: clean
  GoVersion: go1.21.3
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v5.2.1 2023-10-19T20:13:51Z
  Helm Version: v3.12.1+gf32a527
  Kubectl Version: v0.24.2
  Jsonnet Version: v0.20.0

Logs

{"error":"failed to parse template {{ .values | toYaml }}\n: template: :1: function 
\"toYaml\" not defined", ...}
@sdomula sdomula added the bug Something isn't working label Nov 8, 2023
@ishitasequeira
Copy link
Member

The feature PR #15063 did not get added to 2.9.0 release. Added the feature for v2.9.1.

cc: @crenshaw-dev

@sdomula
Copy link
Author

sdomula commented Nov 9, 2023

@ishitasequeira Oh I see. It was mentioned in the release notes of 2.9.0. So that is a bit confusing :)

@crenshaw-dev
Copy link
Member

Closing since 2.9.1 is out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants