-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Error with Kustomize with --enable-helm option #21449
Comments
Hitting the same issue. I believe this is where the bug is: That should be MoreThan instead of LessThan. |
Note that the condition is inverted so it should effectively be a >= 5.3.0. IMO what the OP said in his RCA seems to be what's happening. If that's truly the bug (which is likely IMO) it means that all the kustomize version comparison in this file doesn't work when installing a custom kustomize version, although the most probable one would be this one as the other version checks seems to be >= 3.8.5 and >= 3.7.0 which are quite old. |
Ah yes you're right. Missed the inverted condition! |
@MrFreezeex Thank you for your confirming. Do you have some idea to fix this issue? |
See @Asuforce RCA that is well describing what is happening IMO |
Checklist:
argocd version
.Describe the bug
When using ArgoCD v2.13+ with kustomize v5.3.0 or below, configured through Custom kustomize versions, an error occurs during synchronization when the --enable-helm option is used.
Problem Details
This error occurs because the specified version of kustomize in the repository is v5.2.1-helm, which does not implement the --helm-kube-version flag. This is confirmed by the help output of kustomize_5_2_1.
Root Cause Analysis
The root cause of the problem was analyzed as follows:
The parseKustomizeBuildOptions function checks build options.(source)
A specific condition is true when buildOpts is not empty, the kustomize version is v5.3.0 or above, and --enable-helm is set.(source)
There is an issue with the version obtained through the getSemverSafe -> getSemver -> Version functions.*(source)
The desired binary version is /usr/local/bin/kustomize_5_2_1, but the binary is fixed as kustomize, leading to inconsistency.(source)
To Reproduce
Steps to reproduce the issue:
1.Configure ArgoCD with kustomize v5.2.1-helm.
Expected behavior
Synchronization should proceed without errors, and the --helm-kube-version flag should be handled correctly.
Screenshots
Version
Logs
The text was updated successfully, but these errors were encountered: