Open Armstrong4444 opened 1 year ago
I think this is by design. ArgoCD needs to see the changes from the manifest in git, and the resource in kubernetes. So therefore it requests the k8s resource manifest with the version from the git repo (which is a standard feature in kubernetes).
However, what would be very useful is if ArgoCD flags a deprecated resource, so that the user knows they're using a deprecated api version. (Is there already a feature request for that?) Argocd should know it's deprecated because the k8s api gives it a warning header every time it accesses the resource.
@willemm what you propose seems interesting (the deprecation flag) because the difference between ArgoCD Live Manifest and the one in K8S also suprised us and it appeared "like a bug" at first sight.
I don't believe the situation is normal; ArgoCD should be able to detect any changes in the deployed manifests and reflect that in the live manifest section, regardless of what is read from git.
Bump. Any update on this one?
If apiVersion in yaml manifests is deprecated, K8s automatically changes its value to the latest one. But ArgoCD doesn´t reflect to this change. It leads to situations that the Live Manifests in ArgoCD is different from the ones in Kubernetes. This thing can cause wrong diffs between git repo and Live manifests in ArgoCD.
If I execute kubectl diff command I can see warning in shell:
Warning: secrets-store.csi.x-k8s.io/v1alpha1 is deprecated. Use secrets-store.csi.x-k8s.io/v1 instead.
But I can´t see any warning like that in ArgoCD.To Reproduce
kubectl get secretproviderclass <name> -o yaml
and check apiVersion in it. There is the difference.Expected behavior I would expect corresponding values in apiVersion item in Live Manifest in ArgoCD as it is in K8s or some warning about this situation during comparing manifests in git repo and K8s.
Screenshots
Version