Skip to content

Commit

Permalink
Fixing dependency on Operator Framework. (kubevirt#1390)
Browse files Browse the repository at this point in the history
Required through Operator Lifecycle Manager.

Signed-off-by: Tomasz Baranski <[email protected]>
  • Loading branch information
tomob authored Sep 24, 2020
1 parent 7f36890 commit 2c1a45e
Show file tree
Hide file tree
Showing 37 changed files with 720 additions and 5,124 deletions.
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ require (
github.com/RHsyseng/operator-utils v0.0.0-20190906175225-942a3f9c85a9
github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30
github.com/aws/aws-sdk-go v1.15.77
github.com/blang/semver v3.5.1+incompatible
github.com/containers/image/v5 v5.5.1
github.com/coreos/go-semver v0.3.0
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
github.com/elazarl/goproxy v0.0.0-20190911111923-ecfe977594f1 // indirect
github.com/emicklei/go-restful v2.9.6+incompatible
Expand All @@ -24,6 +24,7 @@ require (
github.com/openshift/client-go v0.0.0
github.com/openshift/custom-resource-status v0.0.0-20200602122900-c002fd1547ca
github.com/openshift/library-go v0.0.0-20200821154433-215f00df72cc
github.com/operator-framework/go-appr v0.0.0-20180917210448-f2aef88446f2 // indirect
github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190725173916-b56e63a643cc
github.com/operator-framework/operator-marketplace v0.0.0-20190617165322-1cbd32624349
github.com/ovirt/go-ovirt v4.3.4+incompatible
Expand All @@ -33,6 +34,7 @@ require (
github.com/rs/cors v1.7.0
github.com/ulikunitz/xz v0.5.7
github.com/vmware/govmomi v0.23.1
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f // indirect
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299
gopkg.in/fsnotify.v1 v1.4.7
gopkg.in/square/go-jose.v2 v2.3.1
Expand All @@ -56,6 +58,7 @@ replace (
github.com/openshift/api => github.com/openshift/api v0.0.0-20200526144822-34f54f12813a
github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20200521150516-05eb9880269c
github.com/openshift/library-go => github.com/mhenriks/library-go v0.0.0-20200804184258-4fc3a5379c7a
github.com/operator-framework/operator-lifecycle-manager => github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190128024246-5eb7ae5bdb7a

k8s.io/api => k8s.io/api v0.18.6
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.18.6
Expand Down
78 changes: 7 additions & 71 deletions go.sum

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pkg/operator/resources/operator/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ go_library(
"//pkg/operator/resources/cluster:go_default_library",
"//pkg/operator/resources/namespaced:go_default_library",
"//pkg/operator/resources/utils:go_default_library",
"//vendor/github.com/blang/semver:go_default_library",
"//vendor/github.com/coreos/go-semver/semver:go_default_library",
"//vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1:go_default_library",
"//vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/lib/version:go_default_library",
"//vendor/k8s.io/api/apps/v1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/api/rbac/v1:go_default_library",
Expand Down
10 changes: 2 additions & 8 deletions pkg/operator/resources/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ package operator
import (
"encoding/json"

"github.com/blang/semver"
"github.com/coreos/go-semver/semver"
csvv1 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/version"

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -2909,11 +2908,6 @@ _The CDI Operator does not support updates yet._
return nil, err
}

csvVersion, err := semver.New(data.CsvVersion)
if err != nil {
return nil, err
}

return &csvv1.ClusterServiceVersion{
TypeMeta: metav1.TypeMeta{
Kind: "ClusterServiceVersion",
Expand Down Expand Up @@ -2948,7 +2942,7 @@ _The CDI Operator does not support updates yet._
DisplayName: "CDI",
Description: description,
Keywords: []string{"CDI", "Virtualization", "Storage"},
Version: version.OperatorVersion{Version: *csvVersion},
Version: *semver.New(data.CsvVersion),
Maturity: "alpha",
Replaces: data.ReplacesCsvVersion,
Maintainers: []csvv1.Maintainer{{
Expand Down
2 changes: 1 addition & 1 deletion tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ go_test(
"//tests/framework:go_default_library",
"//tests/reporters:go_default_library",
"//tests/utils:go_default_library",
"//vendor/github.com/blang/semver:go_default_library",
"//vendor/github.com/coreos/go-semver/semver:go_default_library",
"//vendor/github.com/ghodss/yaml:go_default_library",
"//vendor/github.com/google/uuid:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
Expand Down
10 changes: 4 additions & 6 deletions tests/cdiconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/blang/semver"
"github.com/coreos/go-semver/semver"
route1client "github.com/openshift/client-go/route/clientset/versioned"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
storagev1 "k8s.io/api/storage/v1"
Expand Down Expand Up @@ -208,11 +208,9 @@ var _ = Describe("CDI ingress config tests, using manifests", func() {
)

BeforeEach(func() {
version, err := semver.Make(tests.GetKubeVersion(f))
Expect(err).ToNot(HaveOccurred())
minVersion, err := semver.Make("1.14.0")
Expect(err).ToNot(HaveOccurred())
if !version.GE(minVersion) {
version := *semver.New(tests.GetKubeVersion(f))
minVersion := *semver.New("1.14.0")
if version.LessThan(minVersion) {
Skip(fmt.Sprintf("kubernetes version %s, doesn't support network ingress", version.String()))
}
cfg, err := clientcmd.BuildConfigFromFlags(f.Master, f.KubeConfig)
Expand Down
202 changes: 202 additions & 0 deletions vendor/github.com/coreos/go-semver/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions vendor/github.com/coreos/go-semver/NOTICE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions vendor/github.com/coreos/go-semver/semver/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2c1a45e

Please sign in to comment.