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

Route CRD validation behavior must be the same as openshift-apiserver behavior

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • 4.12.z
    • 4.13.0
    • kube-apiserver
    • False
    • Hide

      None

      Show
      None
    • NA

      This is a clone of issue OCPBUGS-3499. The following is the description of the original issue:

      Description of problem:

      On clusters serving Route via CRD (i.e. MicroShift), Route validation does not perform the same validation as on OCP.

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

       

      How reproducible:

      Always

      Steps to Reproduce:

      $ cat<<EOF | oc apply --server-side -f-
      apiVersion: route.openshift.io/v1
      kind: Route
      metadata:
        name: hello-microshift
      spec:
        to:
          kind: Service
          name: hello-microshift
      EOF
      
      route.route.openshift.io/hello-microshift serverside-applied
      
      $ oc get route hello-microshift -o yaml
      
      apiVersion: route.openshift.io/v1
      kind: Route
      metadata:
        annotations:
          openshift.io/host.generated: "true"
        creationTimestamp: "2022-11-11T23:53:33Z"
        generation: 1
        name: hello-microshift
        namespace: default
        resourceVersion: "2659"
        uid: cd35cd20-b3fd-4d50-9912-f34b3935acfd
      spec:
        host: hello-microshift-default.cluster.local
        to:
          kind: Service
          name: hello-microshift
        wildcardPolicy: None
      
      $ cat<<EOF | oc apply --server-side -f-
      apiVersion: route.openshift.io/v1
      kind: Route
      metadata:
        name: hello-microshift
      spec:
        to:
          kind: Service
          name: hello-microshift
        wildcardPolicy: ""
      EOF
      

      Actual results:

      route.route.openshift.io/hello-microshift serverside-applied

      Expected results:

      The Route "hello-microshift" is invalid: spec.wildcardPolicy: Invalid value: "": field is immutable 

      Additional info:

      ** This change will be inert on OCP, which already has the correct behavior. **

       

            bluddy Ben Luddy
            openshift-crt-jira-prow OpenShift Prow Bot
            Rahul Gangwar Rahul Gangwar
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: