argo-cd: unsupported HPA GVK: autoscaling/v2
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
.
When I try to create an app using HPA apiVersion: autoscaling/v2beta2 the follow error is returned:
ComparisonError
unsupported HPA GVK: autoscaling/v2, Kind=HorizontalPodAutoscaler
SyncError
Failed sync attempt to fdc308aba08fbf3fc08b6d2870fc9acb70d9f09b: ComparisonError: unsupported HPA GVK: autoscaling/v2, Kind=HorizontalPodAutoscaler (retried 5 times).
To Reproduce
I used a typical HPA definition file:
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: test
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: test
minReplicas: 1
maxReplicas: 2
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
If I use apiVersion: autoscaling/v2beta2
Argo CD works perfectly. But this apiVersion is deprecated in Kubernetes v1.23+ and unavailable in v1.26+.
IMPORTANT: When I apply the above definition using kubectl
works fine (I’m using Kubernetes v1.23.5).
Expected behavior
I would like to apply HPA definition using apiVersion: autoscaling/v2
.
Version
$ kubectl exec -it -n argocd deployment/argocd-server -- argocd version
argocd: v2.3.3+07ac038
BuildDate: 2022-03-30T00:06:18Z
GitCommit: 07ac038a8f97a93b401e824550f0505400a8c84e
GitTreeState: clean
GoVersion: go1.17.6
Compiler: gc
Platform: linux/amd64
FATA[0000] Argo CD server address unspecified
command terminated with exit code 1
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 9
- Comments: 31 (5 by maintainers)
I opened a MR in gitops-engine repository: https://github.com/argoproj/gitops-engine/pull/411
Was seeing this issue with ArgoCD 2.1.x with
autoscaling/v2
, and upgrading to 2.5.5 viahttps://raw.githubusercontent.com/argoproj/argo-cd/v2.5.5/manifests/install.yaml
resolved it immediately. (Kubernetes: EKS 1.24)I confirm
autoscaling/v2
resources are synced correctly with Argo CD v2.4.0. This ticket can be closeda workaround we use for disabling health check for the HPA
I have this issue with ArgoCD 2.2.2 and autoscaling/v1. Hpa works fine:
So only one issue here, in Argo in events I see that it’s no healthy with the message: unsupported HPA GVK: autoscaling/v2, Kind=HorizontalPodAutoscaler. But I am using autoscaling/v1, strange…
Kubectl: Client Version: v1.25.2 Kustomize Version: v4.5.7 Server Version: v1.23.4
Should we consider reopen the issue given 2.4.0 does not seem fix it based on several comments above?
Is there any progress or workaround?