Skip to content
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

remove namespace field from scaleTargetRef for hpa #271

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fivesheep
Copy link

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

@divyansh-gupta
Copy link
Contributor

@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?

@fivesheep
Copy link
Author

@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

@bmsiegel
Copy link
Contributor

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

@jetstack-bot
Copy link
Contributor

[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

@fivesheep
Copy link
Author

@bmsiegel the pr has been updated and tested

@fivesheep
Copy link
Author

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

@bmsiegel
Copy link
Contributor

Yea I agree, I merged a fix to this recently (ccf4d25). Would you mind rebasing?

@bmsiegel
Copy link
Contributor

Thanks, running testing now

@cert-manager-prow
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants