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

HPA Throws resource type errors when trying to deploy 4.6.0 via Terraform helm chart #9808

Closed
plynch-magnolia opened this issue Mar 29, 2023 · 5 comments · Fixed by #9803
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@plynch-magnolia
Copy link
Contributor

What happened:

While running the update for version 4.6.0 in a terraformed helm chart, the following error is thrown:
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]

What you expected to happen:

The update couldn't continue because the resources in the default HPA configuration are incorrect according to K8s spec.

NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.): 4.4.0

Kubernetes version (use kubectl version): 1.24

Environment:

  • Cloud provider or hardware configuration: AWS EKS

  • OS (e.g. from /etc/os-release): Amazon Linux 2

  • Kernel (e.g. uname -a): 5.4.219-126.411.amzn2.x86_64

  • Install tools: Terrformed Helm chart

  • Basic cluster related info:

    • kubectl version -- Server Version: version.Info Major:"1", Minor:"24+"
    • kubectl get nodes -o wide 9 total nodes running k8s version v1.24.7-eks-fb459a0
  • How was the ingress-nginx-controller installed: Terraformed helm chart

  • Current State of the controller:
    Name: nginx Labels: app.kubernetes.io/component=controller app.kubernetes.io/instance=mgnl app.kubernetes.io/managed-by=Helm app.kubernetes.io/name=ingress-nginx app.kubernetes.io/part-of=ingress-nginx app.kubernetes.io/version=1.5.1 helm.sh/chart=ingress-nginx-4.4.0 Annotations: ingressclass.kubernetes.io/is-default-class: true meta.helm.sh/release-name: mgnl meta.helm.sh/release-namespace: ingress-nginx Controller: k8s.io/ingress-nginx Events: <none>

How to reproduce this issue:
Using terraform to install a helm chart in an AWS EKS 1.24 cluster, update the helm chart to use version 4.6.0.

Anything else we need to know:

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

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@plynch-magnolia
Copy link
Contributor Author

This issue should be resolved with PR #9803

@longwuyuan
Copy link
Contributor

If you try to insall/upgrade without terraform, just by using helm cli, do you experience the same problem ?

@plynch-magnolia
Copy link
Contributor Author

I don't have an environment to try this but will try to get one setup.

@longwuyuan
Copy link
Contributor

(1) You can use this method to install a second instance of the controller with a distinct identity in its own dedicated namespace https://kubernetes.github.io/ingress-nginx/user-guide/k8s-122-migration/#how-can-i-easily-install-multiple-instances-of-the-ingress-nginx-controller-in-the-same-cluster

(2) But the official recommended procedure to install is static manifest and not a helm chart as documented here https://kubernetes.github.io/ingress-nginx/deploy/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants