operator-sdk icon indicating copy to clipboard operation
operator-sdk copied to clipboard

bundle validate does not fail on invalid minKubeVersion

Open eguzki opened this issue 3 years ago • 1 comments
trafficstars

Feature Request

Describe the problem you need a feature to resolve.

operator-sdk bundle validate passes all tests when CSV's spec.minKubeVersion has invalid version like 1.21

spec.minKubeVersion with value 1.21 is invalid because OLM refuses to deploy the CSV with the following confusing error CSV version parsing error:

....
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
spec: {...}
status:
  cleanup: {}
  conditions:
    - lastTransitionTime: "2022-08-18T17:30:29Z"
      lastUpdateTime: "2022-08-18T17:30:29Z"
      message: requirements not yet checked
      phase: Pending
      reason: RequirementsUnknown
    - lastTransitionTime: "2022-08-18T17:30:29Z"
      lastUpdateTime: "2022-08-18T17:30:29Z"
      message: one or more requirements couldn't be found
      phase: Pending
      reason: RequirementsNotMet
  lastTransitionTime: "2022-08-18T17:30:29Z"
  lastUpdateTime: "2022-08-18T17:30:29Z"
  message: one or more requirements couldn't be found
  phase: Pending
  reason: RequirementsNotMet
  requirementStatus:
    - group: operators.coreos.com
      kind: ClusterServiceVersion
      message: CSV version parsing error
      name: limitador-operator.v0.3.0
      status: PresentNotSatisfied
      version: v1alpha1

When the field spec.minKubeVersion is updated to 1.21.0, then OLM installs the CSV successfully.

Describe the solution you'd like.

CVP team would like the operator-sdk bundle validate command to validate CSV's spec.minKubeVersion when it is specified.

eguzki avatar Aug 18 '22 17:08 eguzki

This seems to be an additional validation mentioning that spec.minKubeVersion should follow semver format which we would have to add in operator-framework/api since it contains the validators ? cc: @jmrodri @camilamacedo86

varshaprasad96 avatar Aug 22 '22 17:08 varshaprasad96

@theishshah moving this to the next release (1.29). Please feel free to update.

varshaprasad96 avatar Feb 15 '23 19:02 varshaprasad96

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar May 17 '23 09:05 openshift-bot

I would like to take this task, I hope I can make it until Jun 26.

kutluhanmetin avatar Jun 15 '23 18:06 kutluhanmetin

@theishshah Are you okay with @kutluhanmetin taking this on? If so, would you mind unassigning yourself and assigning @kutluhanmetin ?

everettraven avatar Jun 15 '23 18:06 everettraven

/label lifecycle/frozen

everettraven avatar Jul 17 '23 21:07 everettraven

@everettraven: The label(s) /label lifecycle/frozen cannot be applied. These labels are supported: platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, downstream-change-needed, rebase/manual, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to this:

/label lifecycle/frozen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

openshift-ci[bot] avatar Jul 17 '23 21:07 openshift-ci[bot]

/lifecycle frozen

everettraven avatar Jul 17 '23 21:07 everettraven