Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-17543

[NE-982] can't patch or edit a route with httpheaders

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • premerge
    • Networking / router
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Critical
    • No
    • None
    • None
    • Proposed
    • Sprint 240
    • 1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      Some PRs related to 4.14 NE982 had been merged, I tried to test it with route and found the http headers couldn't be patch or edit to a route. Reported "Warning: unknown field "spec.httpHeaders"

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

      4.14.0-0.test-2023-08-10-005149-ci-ln-5fii4tt-latest

      How reproducible:

      100%

      Steps to Reproduce:

      1. create an route 
      % oc get route
      NAME            HOST/PORT                                                         PATH    SERVICES        PORT   TERMINATION   WILDCARD
      unsec-server3   unsec-server3.int1.shudi-414g10.qe.gcp.devcluster.openshift.com   /test   unsec-server3   http                 None 
      2. Try to patch the route with httpheaders
      % oc patch --type=merge --patch='{"spec": {"httpHeaders": {"actions": {"response": [{"name": "X-Frame-Options", "action": {"type": "Set", "set": {"value": "aaDENYbb"}}}]}}}}' routes/unsec-server3
      Warning: unknown field "spec.httpHeaders"
      route.route.openshift.io/unsec-server3 patched (no change)
      %  
      3. Try to edit the route with the following:
        httpHeaders:
          actions:
            response:
            - name: X-Cache-Info
              action:
                type: Set
                set:
                  value: "not cacheable; meta data too large"
            request:
            - name: Content-Location
              action:
                type: Set
                set:
                  value: /my-first-blog-post
            - name:   shudi
              action:
                type: Delet
      
      4. 
      % oc edit route unsec-server3
      route.route.openshift.io/unsec-server3 edited
      % 
      % oc get route unsec-server3 -oyaml |  grep -A10 spec:
      spec:
        host: unsec-server3.int1.shudi-414g10.qe.gcp.devcluster.openshift.com
        path: /test
        port:
          targetPort: http
        to:
          kind: Service
          name: unsec-server3
          weight: 100
        wildcardPolicy: None
      status:
      5.
      % oc explain route.spec.httpHeaders
      GROUP:      route.openshift.io
      KIND:       Route
      VERSION:    v1
      
      
      error: field "httpHeaders" does not exist
      %
      6.
       % oc get clusterversion
      NAME      VERSION                                                AVAILABLE   PROGRESSING   SINCE   STATUS
      version   4.14.0-0.test-2023-08-10-005149-ci-ln-5fii4tt-latest   True        False         139m    Cluster version is 4.14.0-0.test-2023-08-10-005149-ci-ln-5fii4tt-latest

      Actual results:

      the changes didn't take effect

      Expected results:

      can add the http headers to the route successfully

      Additional info:

       

              rhn-support-misalunk Miheer Salunke
              shudili@redhat.com Shudi Li
              None
              None
              Shudi Li Shudi Li
              None
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: