aws-privateca-issuer icon indicating copy to clipboard operation
aws-privateca-issuer copied to clipboard

remove namespace field from scaleTargetRef for hpa

Open fivesheep opened this issue 1 year ago • 9 comments

Trying to enable hpa with this chart and getting the following error

unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(HorizontalPodAutoscaler.spec.scaleTargetRef): unknown field "namespace" in io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference

per HorizontalPodAutoscaler spec, it doesn't have this namespace field from scaleTargetRef, removing this line shall fix it. more example can be found from https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics

fivesheep avatar Jul 07 '23 21:07 fivesheep

@fivesheep - Thank you for the pull request, we will review it soon. Can you please confirm that when you removed the line locally, HPA worked for you?

divyansh-gupta avatar Jul 12 '23 13:07 divyansh-gupta

@divyansh-gupta yes, it works after deleting that line. however, the version of the hpa we have is a bit old. I am getting this error

Warning: autoscaling/v2beta1 HorizontalPodAutoscaler is deprecated in v1.22+, unavailable in v1.25+; use autoscaling/v2 HorizontalPodAutoscaler
horizontalpodautoscaler.autoscaling/aws-privateca-issuer created

i can update this from the same pr to upgrade this to autoscaling/v2

fivesheep avatar Jul 18 '23 18:07 fivesheep

That'd be great if you wouldn't mind adding that. Thanks!

bmsiegel avatar Jul 18 '23 18:07 bmsiegel

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fivesheep Once this PR has been reviewed and has the lgtm label, please assign sgtcodfish for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

jetstack-bot avatar Jul 18 '23 19:07 jetstack-bot

@bmsiegel the pr has been updated and tested

fivesheep avatar Jul 18 '23 20:07 fivesheep

test failure seems to be unrelated, the command from the test as shown below, didn't even trigger the hpa logic, which is off by default

helm install issuer ./charts/aws-pca-issuer -n aws-privateca-issuer \
--set serviceAccount.create=false --set serviceAccount.name=aws-privateca-issuer-sa \
--set image.repository="localhost:5000/aws-privateca-issuer" --set image.tag=latest --set image.pullPolicy=Always

fivesheep avatar Jul 25 '23 15:07 fivesheep

Yea I agree, I merged a fix to this recently (https://github.com/cert-manager/aws-privateca-issuer/commit/ccf4d2578f48be6f0a9a4b3bf167b462c0ca57d3). Would you mind rebasing?

bmsiegel avatar Jul 25 '23 15:07 bmsiegel

Thanks, running testing now

bmsiegel avatar Jul 25 '23 15:07 bmsiegel

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

cert-manager-prow[bot] avatar Aug 20 '24 18:08 cert-manager-prow[bot]