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

HorizontalPodAutoscaler api version prevents upgrade to K8s version 1.25+ #9728

Closed
plynch-magnolia opened this issue Mar 13, 2023 · 31 comments · Fixed by #9731
Closed

HorizontalPodAutoscaler api version prevents upgrade to K8s version 1.25+ #9728

plynch-magnolia opened this issue Mar 13, 2023 · 31 comments · Fixed by #9731
Labels
area/stabilization Work for increasing stabilization of the ingress-nginx codebase kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@plynch-magnolia
Copy link
Contributor

What happened:

Error: unable to build kubernetes objects from release manifest: resource mapping not found for name: "mgnl-ingress-nginx-defaultbackend" namespace: "ingress-nginx" from "": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"

What you expected to happen:

Expected chart to be able to be created using K8s version 1.25+

NGINX Ingress controller version : Chart version 4.5.2

Kubernetes version (use kubectl version): 1.25

How to reproduce this issue:
Try to install the helm chart in a k8s v1.2.5+ environment

Anything else we need to know:
Updating the API version to "autoscaling/v2" should resolve the issue.
https://kubernetes.io/docs/reference/using-api/deprecation-guide/#horizontalpodautoscaler-v125

@plynch-magnolia plynch-magnolia added the kind/bug Categorizes issue or PR as related to a bug. label Mar 13, 2023
@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority labels Mar 13, 2023
@longwuyuan
Copy link
Contributor

@plynch-magnolia this is a concern and needs to be addressed asap if a genuine bug because #9348 is supposed to have taken care of this.

So kindly answer the questions asked in a new issue template by editing your original post description of the issue

@plynch-magnolia
Copy link
Contributor Author

I am installing via a terraform helm chart, but my terraform plan fails with the error given above. It seems I will need to specify the value as a parameter. The default value, found here https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/templates/default-backend-hpa.yaml still shows the old value which likely just needs to be updated.

@longwuyuan
Copy link
Contributor

On minikube,

  • K8S version 1.25.3
  • controller chart version 4.5.2
  • helm cli version 3.11.0
  • default values.yaml
    does not run into this error message.

Can you try the same and check.

I think we do need more info because normally multiple reports will come in for such a problem but we don't have multiple reports on this.

@longwuyuan
Copy link
Contributor

/remove-kind bug
/kind support

@k8s-ci-robot k8s-ci-robot added kind/support Categorizes issue or PR as a support question. and removed kind/bug Categorizes issue or PR as related to a bug. labels Mar 13, 2023
@longwuyuan
Copy link
Contributor

/kind bug
/triage accepted
/area stabilization
/priority important-soon

I did not realize earlier that it was about the default-backend so this is a bug and someone has thankfully submitted PR to fix it #9731

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on. area/stabilization Work for increasing stabilization of the ingress-nginx codebase priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority labels Mar 14, 2023
@longwuyuan
Copy link
Contributor

/remove-kind support

@k8s-ci-robot k8s-ci-robot removed the kind/support Categorizes issue or PR as a support question. label Mar 14, 2023
@longwuyuan
Copy link
Contributor

@plynch-magnolia please confirm that the fix works for you now #9731

@longwuyuan
Copy link
Contributor

/reopen
to get confirmation that fix worked

@k8s-ci-robot
Copy link
Contributor

@longwuyuan: Reopened this issue.

In response to this:

/reopen
to get confirmation that fix worked

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot reopened this Mar 14, 2023
@plynch-magnolia
Copy link
Contributor Author

The issue was not fixed for me. Perhaps if a new release version is tagged it will work for me as we need to specify versions. I tried it with no version but got the same issue,

@longwuyuan
Copy link
Contributor

longwuyuan commented Mar 14, 2023 via email

@plynch-magnolia
Copy link
Contributor Author

This is the code I have, which is the minimum I can provide.

resource "helm_release" "ingress" { name = local.ingress_nginx_release_name repository = "https://kubernetes.github.io/ingress-nginx" chart = "ingress-nginx" ...

@longwuyuan
Copy link
Contributor

longwuyuan commented Mar 14, 2023 via email

@plynch-magnolia
Copy link
Contributor Author

I was unable to point directly due to a "not a helm chart directory" error because there is no index.yaml.

@longwuyuan
Copy link
Contributor

tf helm provider has to be told that its not a package but the exploded chart.

in any case, plz wait for a few days as we are trying to release the next iteration of the controller, which will ship the next version of the chart as well

@hpAB
Copy link

hpAB commented Mar 22, 2023

still failing ComparisonError: unsupported HPA GVK: autoscaling/v2, Kind=HorizontalPodAutoscaler

version: 4.5.2
appVersion: 1.6.4
eks 1.25

@longwuyuan
Copy link
Contributor

@hpAB Try to install from the directory "chart" on the project's github repo, until the next release is out

@hpAB
Copy link

hpAB commented Mar 22, 2023

i dont think i can do that from helm. Helm does not currently support git repositories in its dependency resolver
dependencies:

@longwuyuan
Copy link
Contributor

Can you at least clone the github repo or download the zip of the repo from github and try to install from a local path. At least we can know the result of that merged PR which hardcoded the api version to v2.

@plynch-magnolia
Copy link
Contributor Author

When using the newest version of the chart via Terraform, I am now getting the following error:
Error: HorizontalPodAutoscaler.autoscaling "mgnl-ingress-nginx-defaultbackend" is invalid: [spec.metrics[0].resource.target.type: Required value: must specify a metric target type, spec.metrics[0].resource.target.type: Invalid value: "": must be either Utilization, Value, or AverageValue, spec.metrics[0].resource.target.averageUtilization: Required value: must set either a target raw value or a target utilization, spec.metrics[1].resource.target.type: Required value: must specify a metric target type, spec.metrics[1].resource.target.type: Invalid value: "": must be either Utilization, Value, or AverageValue, spec.metrics[1].resource.target.averageUtilization: Required value: must set either a target raw value or a target utilization]

@plynch-magnolia
Copy link
Contributor Author

I opened this PR to address: #9803

@longwuyuan
Copy link
Contributor

Any chance you can install without terraform to report what happens ? Like a install using helm cli or whatever the docs suggest for your provider.

@longwuyuan
Copy link
Contributor

And reminding you that your original post describing the problem has skipped all the questions asked in a new issue template. That does not help any reader coming here and does not help the people who would want to work on this. Please answer the questions asked in the new issue template.

@longwuyuan
Copy link
Contributor

Also try the latest release of the controller because this PR #9731 change the HPA API Version to v2

@plynch-magnolia
Copy link
Contributor Author

I am using the latest release and this is the error I got from my Terraform environment, which is the one it was working in until v1.25 was released.

@longwuyuan
Copy link
Contributor

I am using the latest release and this is the error I got from my Terraform environment, which is the one it was working in until v1.25 was released.

Incorrect.

The description of this issue says this ;

NGINX Ingress controller version : Chart version 4.5.2

But there is one more release after 4.5.2

@plynch-magnolia
Copy link
Contributor Author

It's not a terraform problem, the problem is coming from my EKS environment rejecting the chart because of the errors I have provided here. I don't know how much else I can provide without someone testing adding this to their EKS cluster via Terraform helm. The PR #9731 overcame the first error, but a new error came up to which the PR I submitted, #9803 should overcome.

@plynch-magnolia
Copy link
Contributor Author

I am using the latest release and this is the error I got from my Terraform environment, which is the one it was working in until v1.25 was released.

Incorrect.

The description of this issue says this ;

NGINX Ingress controller version : Chart version 4.5.2

But there is one more release after 4.5.2

I am now using version 4.6.0 and the error I just provided is what I now get.

@longwuyuan
Copy link
Contributor

longwuyuan commented Mar 28, 2023

  • The description of this issue does not match the new error
  • The description of this issue does not match the controller version
  • The description of this issue & related PR does not contain answers to the questions asked in a new issue template, which is required for people working on issues
  • The description of this issue does not contain all the details of manual installation of the controller as per the documented procedure of installing the controller

Basically there is lack of resources and the information provided as per new issue template and as per testing manually installaing on ELS as per documented procedure helps people who want to work on issue. Without that info, others have to guess and do a lot of blind work to even understand the problem, solution and impact of solution on project

@hpAB
Copy link

hpAB commented Mar 29, 2023

apiVersion: v2
name: ingress-nginx
version: 4.6.0
appVersion: 1.7.0
home: https://kubernetes.github.io/ingress-nginx
description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png
type: application
dependencies:

still gives error unsupported HPA GVK: autoscaling/v2, Kind=HorizontalPodAutoscaler when deploying with argocd

@plynch-magnolia
Copy link
Contributor Author

Closing this issue which is no longer applicable as error has shifted to something new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/stabilization Work for increasing stabilization of the ingress-nginx codebase kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants