k8s-bigip-ctlr icon indicating copy to clipboard operation
k8s-bigip-ctlr copied to clipboard

Allow setting redrect status code to 308 and/or 307 on VS CRD

Open mitchellmaler opened this issue 3 years ago • 6 comments

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.

mitchellmaler avatar Jul 27 '21 15:07 mitchellmaler

Created CONTCNTR-2846 for internal PM tracking.

trinaths avatar Aug 09 '21 07:08 trinaths

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

nmenant avatar Jan 28 '22 09:01 nmenant

@mitchellmaler - share your feedback using policy CRD for this requirement

trinaths avatar Feb 02 '22 07:02 trinaths

@trinaths Met with @mdditt2000 today and I believe he updated CONTCNTR-284 with more information regarding this.

mitchellmaler avatar Feb 04 '22 00:02 mitchellmaler

After review the team believes the best options would be to use the iRule defined in the PolicyCRD.

mdditt2000 avatar Feb 22 '22 23:02 mdditt2000

@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:

  1. specify the irules added to the 80 and 443 vips separately using a different field like 'redirect-policy''
  2. ability to specify the redirect code that is placed in the automatically generated redirect irule that is created

mitchellmaler avatar May 04 '22 16:05 mitchellmaler

Recommend use the iRule defined in the PolicyCRD.

trinaths avatar Feb 02 '23 17:02 trinaths