Bug 1916578 - HTTPHeaders setting in IngressController resource doesn't work expectedly
Summary: HTTPHeaders setting in IngressController resource doesn't work expectedly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.6.z
Assignee: Jason Boxman
QA Contact: zhaozhanqi
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-15 06:30 UTC by Catherine_H
Modified: 2024-03-25 17:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-06 03:30:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Catherine_H 2021-01-15 06:30:12 UTC
Description of problem:
HTTPHeaders setting in IngressController resource doesn't work expectedly

https://access.redhat.com/documentation/en-us/openshift_container_platform/4.6/html/networking/configuring-ingress#nw-using-ingress-forwarded_configuring-ingress

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Use the following command to edit the IngressController resource:
$ oc edit IngressController

2. Add httpHeaders related settings
apiVersion: operator.openshift.io/v1
kind: IngressController
metadata:
  name: default
  namespace: openshift-ingress-operator
spec:
  httpHeaders:            # <-- added
    forwarded:            # <-- added
      policy: append            # <-- added

3. Save

Actual results:

The setting wasn't applied properly:

spec:
  httpHeaders: {}

Expected results:

httpHeaders related settings works properly

Additional info:

Comment 1 Arvind iyengar 2021-01-15 08:04:50 UTC
For modifying the "httpHeader" the recommended way would be setting in the below way:
------
spec:
  httpHeaders:
    forwardedHeaderPolicy: Append 
------
This parameter will take "Replace/ IfNone / Never" options. Kindly try to set the forwarded option in the above way and check whether it helps.

Comment 2 Catherine_H 2021-01-15 08:42:58 UTC
Hi Arvind,

Thanks for your kind reply.

I tested with below way and it's worked! :)

------
spec:
  httpHeaders:
    forwardedHeaderPolicy: Append 
------

Maybe the documentation should be fixed accordingly?

Comment 4 Jason Boxman 2021-02-11 18:44:47 UTC
To correct this, I've opened a minor PR[0].

Thanks.

[0] https://github.com/openshift/openshift-docs/pull/29429


Note You need to log in before you can comment on or make changes to this bug.