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
-13
lines changed
pkg/resources/statefulsets Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ package statefulsets
16
16
17
17
import (
18
18
"fmt"
19
+ "github.com/coreos/go-semver/semver"
19
20
"os"
20
21
"strconv"
21
22
"strings"
@@ -33,8 +34,6 @@ import (
33
34
operatoropts "github.com/oracle/mysql-operator/pkg/options/operator"
34
35
"github.com/oracle/mysql-operator/pkg/resources/secrets"
35
36
"github.com/oracle/mysql-operator/pkg/version"
36
-
37
- goverion "github.com/hashicorp/go-version"
38
37
)
39
38
40
39
const (
@@ -160,21 +159,15 @@ func getReplicationGroupSeeds(name string, members int) string {
160
159
}
161
160
162
161
func checkSupportGroupExitStateArgs (deployingVersion string ) bool {
163
- ver , err := goverion .NewVersion (deployingVersion )
164
- if err != nil {
165
- return false
166
- }
162
+ ver := semver .New (deployingVersion )
167
163
168
- minVer , err := goverion .NewVersion (minMysqlVersionWithGroupExitStateArgs )
169
- if err != nil {
170
- return false
171
- }
164
+ minVer := semver .New (minMysqlVersionWithGroupExitStateArgs )
172
165
173
- if ver .GreaterThan ( minVer ) || ver . Equal ( minVer ) {
174
- return true
166
+ if ver .LessThan ( * minVer ) {
167
+ return false
175
168
}
176
169
177
- return false
170
+ return true
178
171
}
179
172
180
173
// Builds the MySQL operator container for a cluster.
You can’t perform that action at this time.
0 commit comments