This repository was archived by the owner on May 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
pkg/resources/statefulsets Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import (
34
34
"github.com/oracle/mysql-operator/pkg/resources/secrets"
35
35
"github.com/oracle/mysql-operator/pkg/version"
36
36
37
- goverion "github.com/hashicorp /go-version "
37
+ "github.com/coreos /go-semver/semver "
38
38
)
39
39
40
40
const (
@@ -160,21 +160,15 @@ func getReplicationGroupSeeds(name string, members int) string {
160
160
}
161
161
162
162
func checkSupportGroupExitStateArgs (deployingVersion string ) bool {
163
- ver , err := goverion .NewVersion (deployingVersion )
164
- if err != nil {
165
- return false
166
- }
163
+ ver := semver .New (deployingVersion )
167
164
168
- minVer , err := goverion .NewVersion (minMysqlVersionWithGroupExitStateArgs )
169
- if err != nil {
170
- return false
171
- }
165
+ minVer := semver .New (minMysqlVersionWithGroupExitStateArgs )
172
166
173
- if ver .GreaterThan ( minVer ) || ver . Equal ( minVer ) {
174
- return true
167
+ if ver .LessThan ( * minVer ) {
168
+ return false
175
169
}
176
170
177
- return false
171
+ return true
178
172
}
179
173
180
174
// Builds the MySQL operator container for a cluster.
You can’t perform that action at this time.
0 commit comments