Skip to content

Commit

Permalink
Merge pull request operator-framework#699 from dinhxuanvu/minkube-fix
Browse files Browse the repository at this point in the history
fix(olm): Remove the "v" prefix in minKubeVersion if presents
  • Loading branch information
openshift-merge-robot authored Feb 9, 2019
2 parents bdac853 + 90e82ca commit d3d9061
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Documentation/design/building-your-csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ The metadata section contains general metadata around the name, version and othe

**Description**: A markdown blob that describes the Operator. Important information to include: features, limitations and common use-cases for the Operator. If your Operator manages different types of installs, eg. standalone vs clustered, it is useful to give an overview of how each differs from each other, or which ones are supported for production use.

**MinKubeVersion**: A minimum version of Kubernetes that server is supposed to have so operator(s) can be deployed.
**MinKubeVersion**: A minimum version of Kubernetes that server is supposed to have so operator(s) can be deployed. The Kubernetes version must be in "Major.Major.Patch" format (e.g: 1.11.0).

**Labels** (optional): Any key/value pairs used to organize and categorize this CSV object.

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/operators/olm/requirements.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (a *Operator) minKubeVersionStatus(name string, minKubeVersion string) (met
return
}

csvVersionInfo, err := semver.NewVersion(minKubeVersion)
csvVersionInfo, err := semver.NewVersion(strings.TrimPrefix(minKubeVersion, "v"))
if err != nil {
status.Status = v1alpha1.RequirementStatusReasonPresentNotSatisfied
status.Message = "CSV version parsing error"
Expand Down

0 comments on commit d3d9061

Please sign in to comment.