k8s-bigip-ctlr
k8s-bigip-ctlr copied to clipboard
Allow setting redrect status code to 308 and/or 307 on VS CRD
Title
Allow setting the redirect status code to 308 or 307 to preserve non GET calls and their arguments.
Description
We have some applications that make POST calls against http but get redirected to https. For manual VIPs our redirect irule would set it to a 308 to preserve the POST call instead of switching to a GET. We would like the same capability with the vs CRD.
Actual Problem
Cannot set redirect code to preserve POST call and it's arguments when using VS CRD.
Solution Proposed
Add option to set redirect code and update the generated irule to reflect it.
Alternatives
Create two vs manually one for http and another for https. The http will have a custom irule to deal with this special case.
Created CONTCNTR-2846 for internal PM tracking.
With CIS 2.7 and later we have provided the ability for our users to attach an iRule to our CRD via the PolicyCRD mechanism. https://clouddocs.f5.com/containers/latest/userguide/crd/policy.html
With Policy CRD, you can assign your iRule to the Virtual Server CRD when required
@mitchellmaler - share your feedback using policy CRD for this requirement
@trinaths Met with @mdditt2000 today and I believe he updated CONTCNTR-284 with more information regarding this.
After review the team believes the best options would be to use the iRule defined in the PolicyCRD.
@mdditt2000 When http is set to redirect it automatically creates an irule to do that redirect with no way to modify the status code (ex 308). When HTTP is allowed both vips get the same irules specified in the VIP or policy which isn't what we want because we would only want the 80 VIP to get the custom redirect irule. That means using policy crd for this isn't really going to work in the current form.
Either need:
- specify the irules added to the 80 and 443 vips separately using a different field like 'redirect-policy''
- ability to specify the redirect code that is placed in the automatically generated redirect irule that is created
Recommend use the iRule defined in the PolicyCRD.