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

API documentation for ingresses.status.componentRoutes.currentHostnames has developer notes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Minor Minor
    • 4.16.0
    • 4.13, 4.12, 4.11, 4.14, 4.15, 4.16
    • Networking / router
    • Informational
    • No
    • 2
    • Sprint 252
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, the API documentation for the `status.componentRoutes.currentHostnames` field in the Ingress config API included developer notes. After you entered the `oc explain ingresses.status.componentRoutes.currentHostnames --api-version=config.openshift.io/v1` command, developer notes would show in the output along with the intended information. With this release, the developer notes are removed from the `status.componentRoutes.currentHostnames` field, so that after you enter the command, the output lists current hostnames used by the route. (link:https://issues.redhat.com/browse/OCPBUGS-31058[*OCPBUGS-31058*])
      Show
      * Previously, the API documentation for the `status.componentRoutes.currentHostnames` field in the Ingress config API included developer notes. After you entered the `oc explain ingresses.status.componentRoutes.currentHostnames --api-version=config.openshift.io/v1` command, developer notes would show in the output along with the intended information. With this release, the developer notes are removed from the `status.componentRoutes.currentHostnames` field, so that after you enter the command, the output lists current hostnames used by the route. (link: https://issues.redhat.com/browse/OCPBUGS-31058 [* OCPBUGS-31058 *])
    • Bug Fix
    • Done

      Description of problem

      The API documentation for the status.componentRoutes.currentHostnames field in the ingress config API has developer notes from the Go definition.

      Version-Release number of selected component (if applicable)

      OpenShift 4.11 and all subsequent versions of OpenShift so far.

      How reproducible

      100%.

      Steps to Reproduce

      1. Read the documentation for the API field: oc explain ingresses.status.componentRoutes.currentHostnames --api-version=config.openshift.io/v1

      Actual results

      The ingresses.config.openshift.io CRD has developer notes in the description of the status.componentRoutes.currentHostnames field:

      % oc explain ingresses.status.componentRoutes.currentHostnames --api-version=config.openshift.io/v1
      KIND:     Ingress
      VERSION:  config.openshift.io/v1
      
      FIELD:    currentHostnames <[]string>
      
      DESCRIPTION:
           currentHostnames is the list of current names used by the route. Typically,
           this list should consist of a single hostname, but if multiple hostnames
           are supported by the route the operator may write multiple entries to this
           list.
      
           Hostname is an alias for hostname string validation. The left operand of
           the | is the original kubebuilder hostname validation format, which is
           incorrect because it allows upper case letters, disallows hyphen or number
           in the TLD, and allows labels to start/end in non-alphanumeric characters.
           See https://bugzilla.redhat.com/show_bug.cgi?id=2039256.
           ^([a-zA-Z0-9\p{S}\p{L}]((-?[a-zA-Z0-9\p{S}\p{L}]{0,62})?)|([a-zA-Z0-9\p{S}\p{L}](([a-zA-Z0-9-\p{S}\p{L}]{0,61}[a-zA-Z0-9\p{S}\p{L}])?)(\.)){1,}([a-zA-Z\p{L}]){2,63})$
           The right operand of the | is a new pattern that mimics the current API
           route admission validation on hostname, except that it allows hostnames
           longer than the maximum length:
           ^(([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})[\.]){0,}([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})$
           Both operand patterns are made available so that modifications on ingress
           spec can still happen after an invalid hostname was saved via validation by
           the incorrect left operand of the | operator.
      

      Expected results

      The second paragraph should be omitted from the CRD:

      % oc explain ingresses.status.componentRoutes.currentHostnames --api-version=config.openshift.io/v1
      KIND:     Ingress
      VERSION:  config.openshift.io/v1
      
      FIELD:    currentHostnames <[]string>
      
      DESCRIPTION:
           currentHostnames is the list of current names used by the route. Typically,
           this list should consist of a single hostname, but if multiple hostnames
           are supported by the route the operator may write multiple entries to this
           list.
      

      Additional info

      The API field was introduced in OpenShift 4.8: https://github.com/openshift/api/pull/852/commits/c53c57f3d465f28b27ee4fad48763f049228486e

      The developer note was added in OpenShift 4.11: https://github.com/openshift/api/pull/1120/commits/1fec415423985530a8925a5fd8c87e1741d8c2fb

              mmasters1@redhat.com Miciah Masters
              mmasters1@redhat.com Miciah Masters
              Hongan Li Hongan Li
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: