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

Issue with Application Gateway Ingress Controller #1096

Open
lambertpandian opened this issue Jul 18, 2024 · 1 comment
Open

Issue with Application Gateway Ingress Controller #1096

lambertpandian opened this issue Jul 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@lambertpandian
Copy link

Report

I am trying to migrate the ingress controller from Nginx to Azure Application Gateway. The following is my ingress configuration. I get a 404 Not Found error. Azure Application gateway tries to connect to keda-add-ons-http-interceptor pod for health probe and it is failing, I have attached the screenshot

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    meta.helm.sh/release-name: xkcd
    meta.helm.sh/release-namespace: keda-tester
  creationTimestamp: "2024-07-17T06:55:08Z"
  generation: 1
  labels:
    app.kubernetes.io/managed-by: Helm
  name: xkcd-dev
  namespace: keda
  resourceVersion: "118833"
  uid: 0d93e746-8789-424a-a043-5d90952e9f72
spec:
  ingressClassName: azure-application-gateway
  rules:
  - host: kedatester.mydomain.net
    http:
      paths:
      - backend:
          service:
            name: keda-add-ons-http-interceptor-proxy
            port:
              number: 8080
        path: /
        pathType: Prefix

Azure App gateway health screenshot
image

Expected Behavior

Http Addon needs to work with Azure Application Gateway ingress controller.

Actual Behavior

Http Addon is not working with Azure Application Gateway ingress controller.

Steps to Reproduce the Problem

  1. Install xkcd example with ingressClassName: azure-application-gateway
  2. Connect to the end point

Logs from KEDA HTTP operator

example

HTTP Add-on Version

0.8.0

Kubernetes Version

1.28

Platform

Microsoft Azure

Anything else?

No response

@lambertpandian lambertpandian added the bug Something isn't working label Jul 18, 2024
@JorTurFer
Copy link
Member

Hello,
The problem is that currently we check the user agent to discover if the request is a probe or not and handle it as probe and not as a legit request:

func (rm *Routing) isProbe(r *http.Request) bool {
ua := r.UserAgent()
return kubernetesProbeUserAgent.Match([]byte(ua)) || googleHCUserAgent.Match([]byte(ua))
}

Does AGIC support adding custom user agent to the probe? if yes, just use kube-probe and it'll pass. If not, we will need to include the AGIC user agent. Do you know which is it? Are you willing to open a PR supporting it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To Triage
Development

No branches or pull requests

2 participants