Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmd/operator-verify/manifests/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"

"github.com/operator-framework/api/pkg/manifests"
"github.com/operator-framework/api/pkg/validation"
"github.com/operator-framework/api/pkg/validation/errors"

log "github.com/sirupsen/logrus"
Expand All @@ -24,7 +25,11 @@ validation library.`,
if len(args) != 1 {
log.Fatalf("command %s requires exactly one argument", cmd.CommandPath())
}
_, _, results := manifests.GetManifestsDir(args[0])
bundle, err := manifests.GetBundleFromDir(args[0])
if err != nil {
log.Fatalf("Error generating bundle from directory %s", err.Error())
}
results := validation.AllValidators.Validate(bundle)
nonEmptyResults := []errors.ManifestResult{}
for _, result := range results {
if result.HasError() || result.HasWarn() {
Expand Down
24 changes: 10 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,27 @@ module github.com/operator-framework/api
go 1.13

require (
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d // indirect
github.com/bitly/go-simplejson v0.5.0 // indirect
github.com/blang/semver v3.5.0+incompatible
github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect
github.com/bugsnag/bugsnag-go v1.5.3 // indirect
github.com/bugsnag/panicwrap v1.2.0 // indirect
github.com/garyburd/redigo v1.6.0 // indirect
github.com/ghodss/yaml v1.0.0
github.com/go-bindata/go-bindata/v3 v3.1.3
github.com/gofrs/uuid v3.2.0+incompatible // indirect
github.com/gorilla/handlers v1.4.2 // indirect
github.com/google/go-cmp v0.4.0 // indirect
github.com/imdario/mergo v0.3.8 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/mikefarah/yq/v2 v2.4.1
github.com/operator-framework/operator-registry v1.12.1
github.com/pkg/errors v0.9.1
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.1.0 // indirect
github.com/prometheus/procfs v0.0.5 // indirect
github.com/sirupsen/logrus v1.4.2
github.com/spf13/cobra v0.0.6
github.com/stretchr/testify v1.5.1
github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940 // indirect
github.com/yvasiyarov/gorelic v0.0.7 // indirect
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9 // indirect
golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 // indirect
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 // indirect
k8s.io/api v0.18.2
k8s.io/apiextensions-apiserver v0.18.2
k8s.io/apimachinery v0.18.2
k8s.io/client-go v0.18.2
rsc.io/letsencrypt v0.0.3 // indirect
sigs.k8s.io/controller-runtime v0.6.0
sigs.k8s.io/controller-tools v0.3.0
)
365 changes: 13 additions & 352 deletions go.sum

Large diffs are not rendered by default.

139 changes: 0 additions & 139 deletions pkg/internal/bundle.go

This file was deleted.

22 changes: 22 additions & 0 deletions pkg/manifests/bundle.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package manifests

import (
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1"
)

type Bundle struct {
Name string
Objects []*unstructured.Unstructured
Package string
Channels []string
DefaultChannel string
BundleImage string
CSV *operatorsv1alpha1.ClusterServiceVersion
V1beta1CRDs []*apiextensionsv1beta1.CustomResourceDefinition
V1CRDs []*apiextensionsv1.CustomResourceDefinition
Dependencies []*Dependency
}
Loading