-
Notifications
You must be signed in to change notification settings - Fork 193
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
Rewrite-target-url annotation doesn't work when rewrites / #3616
Comments
Created [CONTCNTR-4973] for internal tracking. |
@jmolinavizcaino could you please provide more details on the requirements to understand the use case better. is the expectation to redirect traffic just for url server.com/ or subpaths like server.com/foo, server.com/bar to server.com/tmp since the actual backend path is /tmp and nothing on /, the app root is /tmp? is this understanding correct? |
Hi @lavanya-f5 We expect that the F5 insert a rewrite rule to substitute the first / by /tmp. So that if the http client enters:
|
Created [CONTCNTR-4983] for internal tracking. |
@jmolinavizcaino Please share CIS config, and sample examples manifests to [email protected] |
Setup Details
CIS Version : 2.13.1
Build: f5networks/k8s-bigip-ctlr:2.13.1
BIGIP Version: Big IP 15.1.8 Build 0.0.7 Final
AS3 Version: 3.26.1
Agent Mode: AS3
Orchestration: K8S
Orchestration Version: v1.23.8
Pool Mode: Cluster
Additional Setup details:
Calico v3.24.3
Description
A K8s administrator needs to rewrite the requests to a web application to append a path prefix to the path send by the client. To implement it, the administrator use the virtual-server.f5.com/rewrite-target-url annotation but it doesn't works when it's configured to rewrite the / to another URI.
virtual-server.f5.com/rewrite-target-url:
server.com/=server.com/tmp`The BIG-IP returns a 422 Error and in the restnoded.log prints this error
`Mon, 28 Oct 2024 16:14:38 GMT - severe: [appsvcs] {"message":"Declaration failed: 01071709:3: Policy '/mycontainers_demoupc/Shared/Ingress_A_B_C_D_443', rule 'url_rewrite_rule_nginx_ie_des_upc_edu__nginx_ie_des_upc_edu_tmp'; operand 'http-uri' with condition 'equals' requires at least 1 value.","level":"error"}
The virtual-server.f5.com/rewrite-app-root is not an alternative because it configure a redirect and not a rewrite.
How can we implement this
Steps To Reproduce
Create in K8s a ingress resource managed by the F5 controller with the annotation . Example:
When the F5 controller try to make the changes in the F5 device reports the error showed previously,
Expected Result
The expected result is the F5 controller doesn't return the error and it should configure the action policy rule with the tcl regsub expression
Actual Result
In this situation, the F5 controller cannot make any changes futher changes in the F5 node until the ingress resource with the rewrite-target-url annotation is deleted.
The text was updated successfully, but these errors were encountered: