Skip to content

Commit 197407c

Browse files
authored
Merge pull request #35 from kevinrizza/remove-registry-dep
Remove registry dependency
2 parents 654ed3f + eb083ab commit 197407c

File tree

101 files changed

+4115
-9226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+4115
-9226
lines changed

cmd/operator-verify/manifests/cmd.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"os"
66

77
"github.com/operator-framework/api/pkg/manifests"
8+
"github.com/operator-framework/api/pkg/validation"
89
"github.com/operator-framework/api/pkg/validation/errors"
910

1011
log "github.com/sirupsen/logrus"
@@ -24,7 +25,11 @@ validation library.`,
2425
if len(args) != 1 {
2526
log.Fatalf("command %s requires exactly one argument", cmd.CommandPath())
2627
}
27-
_, _, results := manifests.GetManifestsDir(args[0])
28+
bundle, err := manifests.GetBundleFromDir(args[0])
29+
if err != nil {
30+
log.Fatalf("Error generating bundle from directory %s", err.Error())
31+
}
32+
results := validation.AllValidators.Validate(bundle)
2833
nonEmptyResults := []errors.ManifestResult{}
2934
for _, result := range results {
3035
if result.HasError() || result.HasWarn() {

go.mod

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,27 @@ module github.com/operator-framework/api
33
go 1.13
44

55
require (
6-
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d // indirect
7-
github.com/bitly/go-simplejson v0.5.0 // indirect
86
github.com/blang/semver v3.5.0+incompatible
9-
github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect
10-
github.com/bugsnag/bugsnag-go v1.5.3 // indirect
11-
github.com/bugsnag/panicwrap v1.2.0 // indirect
12-
github.com/garyburd/redigo v1.6.0 // indirect
137
github.com/ghodss/yaml v1.0.0
148
github.com/go-bindata/go-bindata/v3 v3.1.3
15-
github.com/gofrs/uuid v3.2.0+incompatible // indirect
16-
github.com/gorilla/handlers v1.4.2 // indirect
9+
github.com/google/go-cmp v0.4.0 // indirect
10+
github.com/imdario/mergo v0.3.8 // indirect
11+
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
1712
github.com/mikefarah/yq/v2 v2.4.1
18-
github.com/operator-framework/operator-registry v1.12.1
19-
github.com/pkg/errors v0.9.1
13+
github.com/onsi/ginkgo v1.12.0 // indirect
14+
github.com/onsi/gomega v1.9.0 // indirect
15+
github.com/pkg/errors v0.9.1 // indirect
16+
github.com/prometheus/client_golang v1.1.0 // indirect
17+
github.com/prometheus/procfs v0.0.5 // indirect
2018
github.com/sirupsen/logrus v1.4.2
2119
github.com/spf13/cobra v0.0.6
2220
github.com/stretchr/testify v1.5.1
23-
github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940 // indirect
24-
github.com/yvasiyarov/gorelic v0.0.7 // indirect
25-
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9 // indirect
21+
golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 // indirect
22+
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 // indirect
2623
k8s.io/api v0.18.2
2724
k8s.io/apiextensions-apiserver v0.18.2
2825
k8s.io/apimachinery v0.18.2
2926
k8s.io/client-go v0.18.2
30-
rsc.io/letsencrypt v0.0.3 // indirect
3127
sigs.k8s.io/controller-runtime v0.6.0
3228
sigs.k8s.io/controller-tools v0.3.0
3329
)

go.sum

Lines changed: 13 additions & 352 deletions
Large diffs are not rendered by default.

pkg/internal/bundle.go

Lines changed: 0 additions & 139 deletions
This file was deleted.

pkg/manifests/bundle.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package manifests
2+
3+
import (
4+
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
5+
apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
6+
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
7+
8+
operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1"
9+
)
10+
11+
type Bundle struct {
12+
Name string
13+
Objects []*unstructured.Unstructured
14+
Package string
15+
Channels []string
16+
DefaultChannel string
17+
BundleImage string
18+
CSV *operatorsv1alpha1.ClusterServiceVersion
19+
V1beta1CRDs []*apiextensionsv1beta1.CustomResourceDefinition
20+
V1CRDs []*apiextensionsv1.CustomResourceDefinition
21+
Dependencies []*Dependency
22+
}

0 commit comments

Comments
 (0)