Azure / application-gateway-kubernetes-ingress

This is an ingress controller that can be run on Azure Kubernetes Service (AKS) to allow an Azure Application Gateway to act as the ingress for an AKS cluster.
https://azure.github.io/application-gateway-kubernetes-ingress
MIT License
667 stars 413 forks source link

ProhibitedTargets has incorrect path requirement #1605

Open scriptkiddie123 opened 3 months ago

scriptkiddie123 commented 3 months ago

Describe the bug ProhibitedTargets require the path to end with "/*" as described here: (https://github.com/Azure/application-gateway-kubernetes-ingress/blob/master/crds/AzureIngressProhibitedTarget-v1-CRD-v1.yaml#L28) However when checking in the Azure Application Gateway rules, then paths just have to start with "/", so of you have a rule for a single path, like /index.html, then you can't set that as a AzureIngressProhibitedTarget.

To Reproduce Asuming you have a working values file for you AGIC helmchart deployment, add the following, to activate a prohibited target: `appgw: shared: true prohibitedTargets:

Ingress Controller details

additional notes I am considering just modifying the CRD yaml so it supports basically anything that starts with /, but I am wondering if there are other contraints in the AGIC code?

scriptkiddie123 commented 3 months ago

I have changed this part directly in my cluster: paths: description: >- (optional) A list of URL paths, for which the Ingress Controller is prohibited from mutating Application Gateway configuration; Must begin with a / and end with /* type: array items: type: string pattern: ^\/(?:.+)? I am now able to add /index.html without any problems. I did some changes to the my ingress resource, and it did not break any of the prohibited targets, so that solution seems to work.