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

OLM Validating v2 CRs Against v1 CRDs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • 4.15.z
    • OLM
    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      AWS VPCE Operator (an SRE managed operator) is failing to install due to OLM validating v2 CRs against v1 CRDs.
      
      The CRD AwsVPCEndpoint has two versions: v1alpha1 and v1alpha2. The v1alpha1 CRD had additional required fields and it seems OLM is validating these required fields against a v1alpha2 CR. The cluster only has v1alpha2 CRs installed.
      
      Looking at the InstallPlan:
      ...
          reason: InstallComponentFailed
          status: "False"
          type: Installed
        message: 'error validating existing CRs against new CRD''s schema for "vpcendpoints.avo.openshift.io":
          error validating avo.openshift.io/v1alpha1, Kind=VpcEndpoint "ocm-staging-2f680nvupr68usru982fc94064oisj87-akanni-1039/private-hcp":
          updated validation is too restrictive: [[].spec.externalNameService: Required
          value, [].spec.serviceName: Required value, [].spec.subdomainName: Required value]'

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

          

      How reproducible:

      100%

      Steps to Reproduce:

          1. Install an Operator (Subscription, InstallPlan, ClusterServiceVersion) that has 2 versions of CRDs with various validations.
          2. v1 of the CRD has strict requirements and v2 has relaxed requirements
        
          

      Actual results:

          CSV ends up in Pending state (No Service Account Found) and InstallPlan complains about CRD validation.

      Expected results:

          CSV succeeds at installation

      Additional info:

              lmohanty@redhat.com Lalatendu Mohanty
              drow.openshift.srep Dustin Row
              Jian Zhang Jian Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: