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

Route CRD vs. OCP defaulting disparity

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.12.0
    • 4.12.0
    • MicroShift
    • None
    • uShift Sprint 228, uShift Sprint 229, uShift Sprint 230
    • 3
    • Rejected
    • False
    • Hide

      None

      Show
      None

    Description

      Description of problem:

      Certain Route defaults behave differently on MicroShift (using the CR handler) vs. OCP. The behavior should be the same as on OCP.
      
      Specifically:
      
      - spec.to.kind should default to "Service" if it's specified by the client as ""
      - spec.wildcardPolicy should default to "None" if it's specified by the client as ""
      - spec.tls.termination should default to "edge" if it's specified by the client as "" AND spec.tls.destinationCACertificate is specified by the client as ""
      - spec.tls.termination should default to "edge" if it's specified by the client as "Edge"
      - spec.tls.termination should default to "reencrypt" if it's specified by the client as "Reencrypt"
      - spec.tls.termination should default to "passthrough" if it's specified by the client as "Passthrough"

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

      4.12

      How reproducible:

      Always

      Steps to Reproduce:

      $ cat <<EOF | oc apply -f-
      apiVersion: route.openshift.io/v1
      kind: Route
      metadata:
        name: hello-microshift
      spec:
        to:
          kind: "" 
          name: hello-microshift
      EOF
      
      $ oc get route hello-microshift -o yaml

      Actual results:

      The Route "hello-microshift" is invalid: spec.to.kind: Invalid value: "": must reference a Service
      

      Expected results:

      apiVersion: route.openshift.io/v1
      kind: Route
      metadata:
        name: hello-microshift
        namespace: default
      spec:
        to:
          kind: Service
      

      Additional info:

      The CR handler only applies defaults to fields that are omitted from the request body, or, if the field is not nullable per the schema, are serialized as null. This is why the above Route is accepted when spec.to.kind is absent, but rejected when present, even when empty.

      Attachments

        Issue Links

          Activity

            People

              bluddy Ben Luddy
              bluddy Ben Luddy
              Hongan Li Hongan Li
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: