Skip to content

Application helm spec kubeVersion incorrectly passed to helm template #22606

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

Open
3 tasks done
WojtekTomaszewski opened this issue Apr 8, 2025 · 4 comments · May be fixed by #22650
Open
3 tasks done

Application helm spec kubeVersion incorrectly passed to helm template #22606

WojtekTomaszewski opened this issue Apr 8, 2025 · 4 comments · May be fixed by #22650
Labels
bug Something isn't working

Comments

@WojtekTomaszewski
Copy link

WojtekTomaszewski commented Apr 8, 2025

Checklist:

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

Describe the bug

I work with IBM IKS clusters and cluster version looks like X.Y.Z+IKS. Using it as value for kubeVersion in Application manifest renders Invalid Semantic Version error. It looks like Argo parses it to X.Y.ZIKS and that triggers Helm error.

To Reproduce

Use kubeVersion: 1.30.11+IKS

Expected behavior

Helm template will use value exactly as provided:

helm template --kube-version X.Y.Z+IKS ...

Version

argocd-server: v2.13.2+dc43124
  BuildDate: 2024-12-11T18:37:15Z
  GitCommit: dc43124058130db9a747d141d86d7c2f4aac7bf9
  GitTreeState: clean
  GoVersion: go1.23.1
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v5.4.3 2024-07-19T16:40:33Z
  Helm Version: v3.15.4+gfa9efb0
  Kubectl Version: v0.31.0
  Jsonnet Version: v0.20.0

Logs

ComparisonError
Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = failed to execute helm template command: failed to get command args to log: `helm template . --name-template logs-agent --namespace ibm-observe --kube-version 1.30.11IKS --values /tmp/04d153a1-7052-45ee-9f77-170a62c1f385 <api versions removed> --include-crds` failed exit status 1: Error: invalid kube version '1.30.11IKS': Invalid Semantic Version
3 minutes ago (Tue Apr 08 2025 12:31:13 GMT+0200)
@WojtekTomaszewski WojtekTomaszewski added the bug Something isn't working label Apr 8, 2025
@sivchari
Copy link
Contributor

/assign

@sivchari
Copy link
Contributor

@WojtekTomaszewski

As you can see, semantic version error is occurred, but if we pass the + literal, we can met semantic version error, too since the + is invalid character for helm
And the version handling is introduced in #2303, so I think it's intentional behavior. Argo CD prefers not + but _ .
Thanks.

ref: https://helm.sh/docs/chart_best_practices/conventions/

@crenshaw-dev
Copy link
Member

I don't think that doc applies. Kube API version conventions and Helm chart version conventions are different things.

We should do whatever "helm install" does. If it passes the Kube API version unmodified to the templating logic, we should also pass it unmodified to "helm template".

@sivchari sivchari linked a pull request Apr 13, 2025 that will close this issue
14 tasks
@sivchari
Copy link
Contributor

sivchari commented Apr 13, 2025

Ups, sorry. I misread it.
I fixed this problem in #22650, PTAL 🙏

I'll check again tomorrow.

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

Successfully merging a pull request may close this issue.

3 participants