argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
16.71k stars 5.06k forks source link

Unknown conversion error when syncing a Helm chart with v2.HPA #17795

Open suzaku opened 2 months ago

suzaku commented 2 months ago

Checklist:

Describe the bug

Get the following error when syncing a Helm chart:

ComparisonError: Failed to compare desired state to live state: failed to calculate diff: error calculating structured merge diff: error calculating diff: error while running updater.Apply: converting (v2.HorizontalPodAutoscaler) to (v1.HorizontalPodAutoscaler): unknown conversion

To Reproduce

Helm repo: https://istio-release.storage.googleapis.com/charts Chart: istiod Version: 1.16.7

This issue happened when I was migrating a Helm managed chart to ArgoCD, to emulate the situation:

  1. Use helm install directly
  2. Create an ArgoCD application for the same chart

Expected behavior

ArgoCD adopts the existing resources from Helm.

Screenshots

Version

v2.8.6

Logs

Paste any relevant application logs here.
patrickdappollonio commented 4 weeks ago

This might be related: https://github.com/argoproj/argo-cd/issues/11136#issuecomment-1486846835