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

Invalid CEL in HyperShift HostedCluster CRDs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • 4.20.z
    • 4.20.z
    • HyperShift
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Important
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

          Our PR testing for the HyperShift Operator no longer passes due to recent Hypershift submodule updates which include this commit https://github.com/openshift/hypershift/commit/840e22497087862bbffbb8c229b4816fade67324 which includes ".?" which is not valid CEL.

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

          4.20

      How reproducible:

          Apply the hostedcluster CRD on a ROKS v4.20 cluster.

      Steps to Reproduce:

          1. Deploy ROKS v4.20 cluster (with Calico for CNI instead of OVN).
          2. Apply hostedcluster resource where spec.networking.networkType != OVNKubernetes
          

      Actual results:

          msg: 'Failed to apply object: b''{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"CustomResourceDefinition.apiextensions.k8s.io \\"hostedclusters.hypershift.openshift.io\\" is invalid: spec.validation.openAPIV3Schema.properties[spec].x-kubernetes-validations[9].rule: Invalid value: apiextensions.ValidationRule{Rule:\\"self.networking.networkType == \''OVNKubernetes\'' || !self.?operatorConfiguration.clusterNetworkOperator.ovnKubernetesConfig.hasValue()\\", Message:\\"ovnKubernetesConfig is forbidden when networkType is not OVNKubernetes\\", MessageExpression:\\"\\", Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:\\"\\"}: compilation failed: ERROR: \\u003cinput\\u003e:1:56: unsupported syntax \''.?\''\\n | self.networking.networkType == \''OVNKubernetes\'' || !self.?operatorConfiguration.clusterNetworkOperator.ovnKubernetesConfig.hasValue()\\n | .......................................................^","reason":"Invalid","details":{"name":"hostedclusters.hypershift.openshift.io","group":"apiextensions.k8s.io","kind":"CustomResourceDefinition","causes":[{"reason":"FieldValueInvalid","message":"Invalid      value: apiextensions.ValidationRule{Rule:\\"self.networking.networkType == \''OVNKubernetes\'' || !self.?operatorConfiguration.clusterNetworkOperator.ovnKubernetesConfig.hasValue()\\", Message:\\"ovnKubernetesConfig is forbidden when networkType is not OVNKubernetes\\", MessageExpression:\\"\\", Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:\\"\\"}: compilation failed: ERROR: \\u003cinput\\u003e:1:56: unsupported syntax \''.?\''\\n | self.networking.networkType == \''OVNKubernetes\'' || !self.?operatorConfiguration.clusterNetworkOperator.ovnKubernetesConfig.hasValue()\\n | .......................................................^","field":"spec.validation.openAPIV3Schema.properties[spec].x-kubernetes-validations[9].rule"}]},"code":422}\n'''

      Expected results:

      The hostedcluster CRD should be applied successfully.

      Additional info:

          

              Unassigned Unassigned
              ereilly@redhat.com Evan Reilly
              None
              None
              Yu Li Yu Li
              None
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: