Skip to content

Commit 274df58

Browse files
Merge pull request #699 from dinhxuanvu/minkube-fix
fix(olm): Remove the "v" prefix in minKubeVersion if presents
2 parents f63e36a + 06851cd commit 274df58

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Documentation/design/building-your-csv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ The metadata section contains general metadata around the name, version and othe
232232

233233
**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.
234234

235-
**MinKubeVersion**: A minimum version of Kubernetes that server is supposed to have so operator(s) can be deployed.
235+
**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).
236236

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

pkg/controller/operators/olm/requirements.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (a *Operator) minKubeVersionStatus(name string, minKubeVersion string) (met
5050
return
5151
}
5252

53-
csvVersionInfo, err := semver.NewVersion(minKubeVersion)
53+
csvVersionInfo, err := semver.NewVersion(strings.TrimPrefix(minKubeVersion, "v"))
5454
if err != nil {
5555
status.Status = v1alpha1.RequirementStatusReasonPresentNotSatisfied
5656
status.Message = "CSV version parsing error"

0 commit comments

Comments
 (0)