use*_*702 1 amazon-web-services amazon-elb kubernetes
使用正则表达式时出现以下错误。我想根据查询字符串进行过滤,以将流量发送到不同的端口。
controller.go:217] kubebuilder/controller "msg"="Reconciler error" "error"="failed to reconcile listeners due to failed to reconcile rules due to failed creating rule 1 on arn:aws:elasticloadbalancing:ap-south-1:1234:listener/app/51233e9-testwebdev-test-1eb8/1234 due to ValidationError: Condition value '/(action=.*\u0026uid.*test=[0-9]+)|test|status\u0026uid)' contains a character that is not valid\n\tstatus code: 400, request id: 664231b0-7c95-4ee6-a14b-fb83e9d7590a" "controller"="alb-ingress-controller" "request"={"Namespace":"test-web-dev","Name":"test-ingress-dev"
Run Code Online (Sandbox Code Playgroud)
该路径有正则表达式,如下所示
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
nginx.ingress.kubernetes.io/use-regex: "true"
....
paths:
- path: "/.*(action=.*&uid.*test=[0-9]+)|(test|status&uid)"
backend:
serviceName: httpd
servicePort: 1234
- path: /
backend:
serviceName: httpd
servicePort: 443
Run Code Online (Sandbox Code Playgroud)
正如我看到的清单,您的 Ingress 配置为 AWS ALB 而不是 NGINX,因为kubernetes.io/ingress.class: alb
. 因此,您应该配置 AWS 路径条件合规性,请参阅路径条件了解更多详细信息。AFAIK,部分支持 AWS ALB 正则表达式,而不是完整的正则表达式。
A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters.\n\n1. A\xe2\x80\x93Z, a\xe2\x80\x93z, 0\xe2\x80\x939\n\n2. _ - . $ / ~ " \' @ : +\n\n3. & (using &)\n\n4. * (matches 0 or more characters)\n\n5. ? (matches exactly 1 character)\n
Run Code Online (Sandbox Code Playgroud)\n
归档时间: |
|
查看次数: |
4752 次 |
最近记录: |