From ae4be7057d9b46213e292792ec021aa0d2ac5249 Mon Sep 17 00:00:00 2001 From: "Brad P. Crochet" Date: Wed, 17 Aug 2022 16:56:30 -0400 Subject: [PATCH] Begin usage of operator-framework APIs The operator-framework API[1] has lots of bundle manipulation tools that we can leverage to make our own code simpler. This begins the journey of leveraging those APIs. This removes a good bit of code that we get from the library. [1] https://github.com/operator-framework/api Signed-off-by: Brad P. Crochet --- certification/internal/bundle/bundle.go | 104 +++------------- certification/internal/bundle/bundle_test.go | 117 +----------------- certification/internal/bundle/types.go | 13 ++ .../internal/policy/operator/default.go | 10 +- .../policy/operator/deployable_by_olm.go | 45 +++---- .../policy/operator/deployable_by_olm_test.go | 24 ++-- .../internal/policy/operator/scc_info.go | 13 +- .../operator/validate_operator_bundle.go | 30 ++++- go.mod | 26 +++- go.sum | 35 +++++- 10 files changed, 154 insertions(+), 263 deletions(-) create mode 100644 certification/internal/bundle/types.go diff --git a/certification/internal/bundle/bundle.go b/certification/internal/bundle/bundle.go index 6ce470bb0..40b4c54f3 100644 --- a/certification/internal/bundle/bundle.go +++ b/certification/internal/bundle/bundle.go @@ -2,7 +2,6 @@ package bundle import ( "context" - "errors" "fmt" "io" "os" @@ -12,7 +11,7 @@ import ( rbacv1 "k8s.io/api/rbac/v1" "github.com/blang/semver" - operatorv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" + "github.com/operator-framework/api/pkg/manifests" "github.com/redhat-openshift-ecosystem/openshift-preflight/certification/internal/operatorsdk" log "github.com/sirupsen/logrus" "sigs.k8s.io/yaml" @@ -20,9 +19,6 @@ import ( const ocpVerV1beta1Unsupported = "4.9" -// versionsKey is the OpenShift versions in annotations.yaml that lists the versions allowed for an operator -const versionsKey = "com.redhat.openshift.versions" - type operatorSdk interface { BundleValidate(context.Context, string, operatorsdk.OperatorSdkBundleValidateOptions) (*operatorsdk.OperatorSdkBundleValidateReport, error) } @@ -44,14 +40,14 @@ func Validate(ctx context.Context, operatorSdk operatorSdk, imagePath string) (* if err != nil { return nil, fmt.Errorf("could not open annotations.yaml: %v", err) } - annotations, err := GetAnnotations(ctx, annotationsFile) + annotations, err := LoadAnnotations(ctx, annotationsFile) if err != nil { return nil, fmt.Errorf("unable to get annotations.yaml from the bundle: %v", err) } - if versions, ok := annotations[versionsKey]; ok { + if annotations.OpenshiftVersions != "" { // Check that the label range contains >= 4.9 - if isTarget49OrGreater(versions) { + if isTarget49OrGreater(annotations.OpenshiftVersions) { log.Debug("OpenShift 4.9 detected in annotations. Running with additional checks enabled.") opts.OptionalValues = make(map[string]string) opts.OptionalValues["k8s-version"] = "1.22" @@ -133,100 +129,34 @@ func cleanStringToGetTheVersionToParse(value string) string { return value } -// GetAnnotations accepts a context, and an io.Reader that is expected to provide +// LoadAnnotations accepts a context, and an io.Reader that is expected to provide // the annotations.yaml, and parses the annotations from there -func GetAnnotations(ctx context.Context, r io.Reader) (map[string]string, error) { - fileContents, err := io.ReadAll(r) +func LoadAnnotations(ctx context.Context, r io.Reader) (*Annotations, error) { + annFile, err := io.ReadAll(r) if err != nil { return nil, fmt.Errorf("fail to read metadata/annotation.yaml file in bundle: %v", err) } - annotations, err := ExtractAnnotationsBytes(ctx, fileContents) - if err != nil { - return nil, fmt.Errorf("metadata/annotations.yaml found but is malformed: %v", err) - } - - return annotations, nil -} - -// extractAnnotationsBytes reads the annotation data read from a file and returns the expected format for that yaml -// represented as a map[string]string. -func ExtractAnnotationsBytes(ctx context.Context, annotationBytes []byte) (map[string]string, error) { - type metadata struct { - Annotations map[string]string - } - - if len(annotationBytes) == 0 { - return nil, errors.New("the annotations file was empty") - } - - var bundleMeta metadata - if err := yaml.Unmarshal(annotationBytes, &bundleMeta); err != nil { - return nil, fmt.Errorf("metadata/annotations.yaml found but is malformed: %v", err) - } - - return bundleMeta.Annotations, nil -} - -func GetCsvFilePathFromBundle(imageDir string) (string, error) { - log.Trace("reading clusterserviceversion file from the bundle") - log.Debug("image directory is ", imageDir) - matches, err := filepath.Glob(filepath.Join(imageDir, "manifests", "*.clusterserviceversion.yaml")) - if err != nil { - return "", fmt.Errorf("glob pattern is malformed: %v", err) - } - if len(matches) == 0 { - return "", fmt.Errorf("unable to find clusterserviceversion file in the bundle image: %v", os.ErrNotExist) - } - if len(matches) > 1 { - return "", fmt.Errorf("more than one CSV file detected in bundle") - } - log.Debugf("The path to csv file is %s", matches[0]) - return matches[0], nil -} - -func csvFromReader(ctx context.Context, csvReader io.Reader) (*operatorv1alpha1.ClusterServiceVersion, error) { - var csv operatorv1alpha1.ClusterServiceVersion - bts, err := io.ReadAll(csvReader) - if err != nil { - return nil, fmt.Errorf("could not get CSV from reader: %v", err) - } - err = yaml.Unmarshal(bts, &csv) - if err != nil { - return nil, fmt.Errorf("malformed CSV detected: %v", err) + if len(annFile) == 0 { + return nil, fmt.Errorf("annotations file was empty") } - return &csv, nil -} - -func GetSupportedInstallModes(ctx context.Context, csvReader io.Reader) (map[string]bool, error) { - csv, err := csvFromReader(ctx, csvReader) - if err != nil { - return nil, err + var annotationsFile AnnotationsFile + if err := yaml.Unmarshal(annFile, &annotationsFile); err != nil { + return nil, fmt.Errorf("unable to load the annotations file: %v", err) } - installedModes := make(map[string]bool, len(csv.Spec.InstallModes)) - for _, v := range csv.Spec.InstallModes { - if v.Supported { - installedModes[string(v.Type)] = true - } - } - return installedModes, nil + return &annotationsFile.Annotations, nil } // GetSecurityContextConstraints returns an string array of SCC resource names requested by the operator as specified // in the csv -func GetSecurityContextConstraints(ctx context.Context, csvReader io.Reader) ([]string, error) { - var csv operatorv1alpha1.ClusterServiceVersion - bts, err := io.ReadAll(csvReader) - if err != nil { - return nil, fmt.Errorf("could not get CSV from reader: %v", err) - } - err = yaml.Unmarshal(bts, &csv) +func GetSecurityContextConstraints(ctx context.Context, bundlePath string) ([]string, error) { + bundle, err := manifests.GetBundleFromDir(bundlePath) if err != nil { - return nil, fmt.Errorf("malformed CSV detected: %v", err) + return nil, fmt.Errorf("could not get bundle from dir: %s: %v", bundlePath, err) } - for _, cp := range csv.Spec.InstallStrategy.StrategySpec.ClusterPermissions { + for _, cp := range bundle.CSV.Spec.InstallStrategy.StrategySpec.ClusterPermissions { for _, rule := range cp.Rules { if hasSCCApiGroup(rule) && hasSCCResource(rule) { return rule.ResourceNames, nil diff --git a/certification/internal/bundle/bundle_test.go b/certification/internal/bundle/bundle_test.go index 625cdf131..2dd786bc0 100644 --- a/certification/internal/bundle/bundle_test.go +++ b/certification/internal/bundle/bundle_test.go @@ -1,10 +1,10 @@ package bundle import ( + "bytes" "context" "os" "path/filepath" - "strings" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -111,121 +111,16 @@ var _ = Describe("BundleValidateCheck", func() { Expect(report).ToNot(BeNil()) }) }) - - Context("getting the CSV file from the bundle", func() { - var manifestsPath string - - BeforeEach(func() { - manifestsPath = filepath.Join(imageRef.ImageFSPath, manifestsDir) - err := os.WriteFile(filepath.Join(manifestsPath, clusterServiceVersionFilename), []byte(""), 0o644) - Expect(err).ToNot(HaveOccurred()) - }) - Context("the CSV is malformed", func() { - It("should error", func() { - r := strings.NewReader("badcsv::bad") - images, err := GetSupportedInstallModes(context.TODO(), r) - Expect(err).To(HaveOccurred()) - Expect(images).To(BeNil()) - }) - }) - Context("the CSV could not be read", func() { - It("should error", func() { - images, err := GetSupportedInstallModes(context.TODO(), errReader(0)) - Expect(err).To(HaveOccurred()) - Expect(images).To(BeNil()) - }) - }) - Context("the CSV exists by itself", func() { - It("should return the filename", func() { - filename, err := GetCsvFilePathFromBundle(imageRef.ImageFSPath) - Expect(err).ToNot(HaveOccurred()) - Expect(filename).To(Equal(filepath.Join(manifestsPath, clusterServiceVersionFilename))) - }) - }) - Context("the CSV doesn't exist", func() { - JustBeforeEach(func() { - err := os.Remove(filepath.Join(manifestsPath, clusterServiceVersionFilename)) - Expect(err).ToNot(HaveOccurred()) - }) - It("should return an error", func() { - filename, err := GetCsvFilePathFromBundle(imageRef.ImageFSPath) - Expect(err).To(HaveOccurred()) - Expect(filename).To(Equal("")) - }) - }) - Context("there is more than one CSV", func() { - JustBeforeEach(func() { - err := os.WriteFile(filepath.Join(manifestsPath, "otheroperator.clusterserviceversion.yaml"), []byte(""), 0o664) - Expect(err).ToNot(HaveOccurred()) - }) - It("should return an error", func() { - filename, err := GetCsvFilePathFromBundle(imageRef.ImageFSPath) - Expect(err).To(HaveOccurred()) - Expect(filename).To(Equal("")) - }) - }) - Context("there is a bad mount dir", func() { - It("should return an error", func() { - filename, err := GetCsvFilePathFromBundle("[]") - Expect(err).To(HaveOccurred()) - Expect(filename).To(Equal("")) - }) - }) - }) - }) - - Describe("Supported Install Modes", func() { - var csv string = `spec: - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces` - - Context("CSV is valid", func() { - It("should return a map of 3", func() { - installModes, err := GetSupportedInstallModes(context.Background(), strings.NewReader(csv)) - Expect(err).ToNot(HaveOccurred()) - Expect(installModes).ToNot(BeNil()) - Expect(len(installModes)).To(Equal(3)) - Expect("MultiNamespace").ToNot(BeElementOf(installModes)) - }) - }) - - Context("reader is not valid", func() { - It("should error", func() { - installModes, err := GetSupportedInstallModes(context.Background(), errReader(0)) - Expect(err).To(HaveOccurred()) - Expect(installModes).To(BeNil()) - }) - }) - - Context("CSV is invalid", func() { - JustBeforeEach(func() { - csv = `invalid` - }) - It("should error", func() { - installModes, err := GetSupportedInstallModes(context.Background(), strings.NewReader(csv)) - Expect(err).To(HaveOccurred()) - Expect(installModes).To(BeNil()) - }) - }) }) Describe("While ensuring that container util is working", func() { // tests: extractAnnotationsBytes Context("with an annotations yaml data read from disk", func() { Context("with the correct format", func() { - data := []byte("annotations:\n foo: bar") - It("should properly marshal to a map[string]string", func() { - annotations, err := ExtractAnnotationsBytes(context.TODO(), data) + annotations, err := LoadAnnotations(context.TODO(), bytes.NewReader([]byte(annotations))) Expect(err).ToNot(HaveOccurred()) - Expect(annotations["foo"]).To(Equal("bar")) + Expect(annotations.DefaultChannelName).To(Equal("testChannel")) }) }) @@ -233,7 +128,7 @@ var _ = Describe("BundleValidateCheck", func() { data := []byte{} It("should return an error", func() { - _, err := ExtractAnnotationsBytes(context.TODO(), data) + _, err := LoadAnnotations(context.TODO(), bytes.NewReader(data)) Expect(err).To(HaveOccurred()) }) }) @@ -242,14 +137,14 @@ var _ = Describe("BundleValidateCheck", func() { data := []byte(`malformed`) It("should return an error", func() { - _, err := ExtractAnnotationsBytes(context.TODO(), data) + _, err := LoadAnnotations(context.TODO(), bytes.NewReader(data)) Expect(err).To(HaveOccurred()) }) }) Context("a bad reader is sent to GetAnnotations", func() { It("should return an error", func() { - annotations, err := GetAnnotations(context.Background(), errReader(0)) + annotations, err := LoadAnnotations(context.TODO(), errReader(0)) Expect(err).To(HaveOccurred()) Expect(annotations).To(BeNil()) }) diff --git a/certification/internal/bundle/types.go b/certification/internal/bundle/types.go new file mode 100644 index 000000000..24026894c --- /dev/null +++ b/certification/internal/bundle/types.go @@ -0,0 +1,13 @@ +package bundle + +import "github.com/operator-framework/api/pkg/manifests" + +type AnnotationsFile struct { + Annotations Annotations `json:"annotations" yaml:"annotations"` +} + +type Annotations struct { + manifests.Annotations + + OpenshiftVersions string `json:"com.redhat.openshift.versions,omitempty" yaml:"com.redhat.openshift.versions,omitempty"` +} diff --git a/certification/internal/policy/operator/default.go b/certification/internal/policy/operator/default.go index 4f343388c..faf2b37e1 100644 --- a/certification/internal/policy/operator/default.go +++ b/certification/internal/policy/operator/default.go @@ -52,10 +52,10 @@ var ( "registry.access.redhat.com": {}, } - prioritizedInstallModes = []string{ - string(operatorv1alpha1.InstallModeTypeOwnNamespace), - string(operatorv1alpha1.InstallModeTypeSingleNamespace), - string(operatorv1alpha1.InstallModeTypeMultiNamespace), - string(operatorv1alpha1.InstallModeTypeAllNamespaces), + prioritizedInstallModes = []operatorv1alpha1.InstallModeType{ + operatorv1alpha1.InstallModeTypeOwnNamespace, + operatorv1alpha1.InstallModeTypeSingleNamespace, + operatorv1alpha1.InstallModeTypeMultiNamespace, + operatorv1alpha1.InstallModeTypeAllNamespaces, } ) diff --git a/certification/internal/policy/operator/deployable_by_olm.go b/certification/internal/policy/operator/deployable_by_olm.go index e917dd792..b7c5b1779 100644 --- a/certification/internal/policy/operator/deployable_by_olm.go +++ b/certification/internal/policy/operator/deployable_by_olm.go @@ -11,6 +11,7 @@ import ( "sync" "time" + "github.com/operator-framework/api/pkg/manifests" operatorv1 "github.com/operator-framework/api/pkg/operators/v1" operatorv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" corev1 "k8s.io/api/core/v1" @@ -37,7 +38,7 @@ type operatorData struct { App string InstallNamespace string TargetNamespace string - InstallModes map[string]bool + InstallModes map[operatorv1alpha1.InstallModeType]operatorv1alpha1.InstallMode CsvNamespaces []string InstalledCsv string } @@ -198,7 +199,7 @@ func (p *DeployableByOlmCheck) operatorMetadata(ctx context.Context, bundleRef c if err != nil { return nil, fmt.Errorf("could not open annotations.yaml: %w", err) } - annotations, err := bundle.GetAnnotations(ctx, annotationsFile) + annotations, err := bundle.LoadAnnotations(ctx, annotationsFile) if err != nil { return nil, fmt.Errorf("unable to get annotations.yaml from the bundle: %w", err) } @@ -206,10 +207,7 @@ func (p *DeployableByOlmCheck) operatorMetadata(ctx context.Context, bundleRef c catalogImage := p.indexImage // introspect the channel from the bundle. - channel, err := annotation(annotations, channelKeyInBundle) - if err != nil { - return nil, fmt.Errorf("unable to extract channel name from the bundle: %w", err) - } + channel := annotations.DefaultChannelName // The user provided a channel configuration so we will // use that instead of the introspected value. @@ -217,24 +215,16 @@ func (p *DeployableByOlmCheck) operatorMetadata(ctx context.Context, bundleRef c channel = p.channel } - packageName, err := annotation(annotations, packageKey) - if err != nil { - return nil, fmt.Errorf("unable to extract package name from the bundle: %w", err) - } + packageName := annotations.PackageName - csvFilepath, err := bundle.GetCsvFilePathFromBundle(bundleRef.ImageFSPath) + bundle, err := manifests.GetBundleFromDir(bundleRef.ImageFSPath) if err != nil { return nil, err } - csvFileReader, err := os.Open(csvFilepath) - if err != nil { - return nil, err - } - - installModes, err := bundle.GetSupportedInstallModes(ctx, csvFileReader) - if err != nil { - return nil, fmt.Errorf("unable to extract operator install modes from ClusterServiceVersion: %w", err) + installModes := make(map[operatorv1alpha1.InstallModeType]operatorv1alpha1.InstallMode) + for _, val := range bundle.CSV.Spec.InstallModes { + installModes[val.Type] = val } return &operatorData{ @@ -352,24 +342,23 @@ func (p *DeployableByOlmCheck) setUp(ctx context.Context, operatorData *operator } func (p *DeployableByOlmCheck) generateOperatorGroupData(operatorData *operatorData) openshift.OperatorGroupData { - var installMode string - for i := 0; i < len(prioritizedInstallModes); i++ { - if _, ok := operatorData.InstallModes[prioritizedInstallModes[i]]; ok { - installMode = prioritizedInstallModes[i] - break + var installMode operatorv1alpha1.InstallModeType + for _, v := range prioritizedInstallModes { + if operatorData.InstallModes[v].Supported { + installMode = operatorData.InstallModes[v].Type } } log.Debugf("The operator install mode is %s", installMode) targetNamespaces := make([]string, 2) switch installMode { - case string(operatorv1alpha1.InstallModeTypeOwnNamespace): + case operatorv1alpha1.InstallModeTypeOwnNamespace: targetNamespaces = []string{operatorData.InstallNamespace} - case string(operatorv1alpha1.InstallModeTypeSingleNamespace): + case operatorv1alpha1.InstallModeTypeSingleNamespace: targetNamespaces = []string{operatorData.TargetNamespace} - case string(operatorv1alpha1.InstallModeTypeMultiNamespace): + case operatorv1alpha1.InstallModeTypeMultiNamespace: targetNamespaces = []string{operatorData.TargetNamespace, operatorData.InstallNamespace} - case string(operatorv1alpha1.InstallModeTypeAllNamespaces): + case operatorv1alpha1.InstallModeTypeAllNamespaces: targetNamespaces = []string{} } diff --git a/certification/internal/policy/operator/deployable_by_olm_test.go b/certification/internal/policy/operator/deployable_by_olm_test.go index 9bbd6682a..73e08553b 100644 --- a/certification/internal/policy/operator/deployable_by_olm_test.go +++ b/certification/internal/policy/operator/deployable_by_olm_test.go @@ -40,6 +40,7 @@ var _ = Describe("DeployableByOLMCheck", func() { annotations = `annotations: operators.operatorframework.io.bundle.package.v1: testPackage operators.operatorframework.io.bundle.channel.default.v1: testChannel + operators.operatorframework.io.bundle.channels.v1: testChannel ` registryAuthToken = `{ "auths": { @@ -49,17 +50,18 @@ var _ = Describe("DeployableByOLMCheck", func() { } }` - csvStr = ` - spec: - installModes: - - supported: false - type: OwnNamespace - - supported: false - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces + csvStr = `apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +spec: + installModes: + - supported: false + type: OwnNamespace + - supported: false + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces ` ) BeforeEach(func() { diff --git a/certification/internal/policy/operator/scc_info.go b/certification/internal/policy/operator/scc_info.go index e981364b3..60878013d 100644 --- a/certification/internal/policy/operator/scc_info.go +++ b/certification/internal/policy/operator/scc_info.go @@ -3,7 +3,6 @@ package operator import ( "context" "fmt" - "os" "github.com/redhat-openshift-ecosystem/openshift-preflight/certification/internal/bundle" log "github.com/sirupsen/logrus" @@ -35,17 +34,7 @@ func (p *securityContextConstraintsInCSV) Validate(ctx context.Context, bundleRe } func (p *securityContextConstraintsInCSV) dataToValidate(ctx context.Context, imagePath string) ([]string, error) { - csvFilepath, err := bundle.GetCsvFilePathFromBundle(imagePath) - if err != nil { - return nil, err - } - - csvFileReader, err := os.Open(csvFilepath) - if err != nil { - return nil, err - } - - requestedSccList, err := bundle.GetSecurityContextConstraints(ctx, csvFileReader) + requestedSccList, err := bundle.GetSecurityContextConstraints(ctx, imagePath) if err != nil { return nil, fmt.Errorf("unable to extract security context constraints from ClusterServiceVersion: %w", err) } diff --git a/certification/internal/policy/operator/validate_operator_bundle.go b/certification/internal/policy/operator/validate_operator_bundle.go index d34649d7a..43ceef318 100644 --- a/certification/internal/policy/operator/validate_operator_bundle.go +++ b/certification/internal/policy/operator/validate_operator_bundle.go @@ -4,6 +4,8 @@ import ( "context" "fmt" + "github.com/operator-framework/api/pkg/manifests" + "github.com/operator-framework/api/pkg/validation" "github.com/redhat-openshift-ecosystem/openshift-preflight/certification" "github.com/redhat-openshift-ecosystem/openshift-preflight/certification/internal/bundle" "github.com/redhat-openshift-ecosystem/openshift-preflight/certification/internal/operatorsdk" @@ -26,7 +28,7 @@ func NewValidateOperatorBundleCheck(operatorSdk operatorSdk) *ValidateOperatorBu const ocpVerV1beta1Unsupported = "4.9" -func (p ValidateOperatorBundleCheck) Validate(ctx context.Context, bundleRef certification.ImageReference) (bool, error) { +func (p *ValidateOperatorBundleCheck) Validate(ctx context.Context, bundleRef certification.ImageReference) (bool, error) { report, err := p.getDataToValidate(ctx, bundleRef.ImageFSPath) if err != nil { return false, fmt.Errorf("error while executing operator-sdk bundle validate: %v", err) @@ -35,11 +37,27 @@ func (p ValidateOperatorBundleCheck) Validate(ctx context.Context, bundleRef cer return p.validate(ctx, report) } -func (p ValidateOperatorBundleCheck) getDataToValidate(ctx context.Context, imagePath string) (*operatorsdk.OperatorSdkBundleValidateReport, error) { +func (p *ValidateOperatorBundleCheck) dataToValidate(ctx context.Context, imagePath string) (map[string]bool, error) { + valid := make(map[string]bool) + bundle, err := manifests.GetBundleFromDir(imagePath) + if err != nil { + return nil, fmt.Errorf("could not read bundle: %v", err) + } + validators := validation.DefaultBundleValidators + validators = validators.WithValidators(validation.ObjectValidator) + results := validators.Validate(bundle.ObjectsToValidate()...) + for _, result := range results { + if result.HasError() || result.HasWarn() { + } + } + return valid, nil +} + +func (p *ValidateOperatorBundleCheck) getDataToValidate(ctx context.Context, imagePath string) (*operatorsdk.OperatorSdkBundleValidateReport, error) { return bundle.Validate(ctx, p.OperatorSdk, imagePath) } -func (p ValidateOperatorBundleCheck) validate(ctx context.Context, report *operatorsdk.OperatorSdkBundleValidateReport) (bool, error) { +func (p *ValidateOperatorBundleCheck) validate(ctx context.Context, report *operatorsdk.OperatorSdkBundleValidateReport) (bool, error) { if !report.Passed || len(report.Outputs) > 0 { for _, output := range report.Outputs { var logFn func(...interface{}) @@ -57,11 +75,11 @@ func (p ValidateOperatorBundleCheck) validate(ctx context.Context, report *opera return report.Passed, nil } -func (p ValidateOperatorBundleCheck) Name() string { +func (p *ValidateOperatorBundleCheck) Name() string { return "ValidateOperatorBundle" } -func (p ValidateOperatorBundleCheck) Metadata() certification.Metadata { +func (p *ValidateOperatorBundleCheck) Metadata() certification.Metadata { return certification.Metadata{ Description: "Validating Bundle image that checks if it can validate the content and format of the operator bundle", Level: "best", @@ -70,7 +88,7 @@ func (p ValidateOperatorBundleCheck) Metadata() certification.Metadata { } } -func (p ValidateOperatorBundleCheck) Help() certification.HelpText { +func (p *ValidateOperatorBundleCheck) Help() certification.HelpText { return certification.HelpText{ Message: "Check ValidateOperatorBundle encountered an error. Please review the preflight.log file for more information.", Suggestion: "Valid bundles are defined by bundle spec, so make sure that this bundle conforms to that spec. More Information: https://github.com/operator-framework/operator-registry/blob/master/docs/design/operator-bundle.md", diff --git a/go.mod b/go.mod index 6aecdfaa8..64780a000 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/onsi/gomega v1.20.0 github.com/openshift/api v0.0.0-20210910062324-a41d3573a3ba github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 - github.com/operator-framework/api v0.15.0 + github.com/operator-framework/api v0.16.0 github.com/operator-framework/operator-manifest-tools v0.2.1 github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 github.com/sirupsen/logrus v1.8.1 @@ -28,6 +28,8 @@ require ( require ( github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e // indirect + github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect @@ -38,6 +40,7 @@ require ( github.com/docker/docker-credential-helpers v0.6.4 // indirect github.com/emicklei/go-restful v2.9.5+incompatible // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/go-logr/logr v1.2.0 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect @@ -46,10 +49,12 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect + github.com/google/cel-go v0.10.1 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.5.8 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.3.0 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect @@ -70,6 +75,7 @@ require ( github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.1 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.12.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.32.1 // indirect @@ -77,8 +83,20 @@ require ( github.com/spf13/afero v1.8.2 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/stoewer/go-strcase v1.2.0 // indirect + github.com/stretchr/testify v1.7.1 // indirect github.com/subosito/gotenv v1.3.0 // indirect github.com/vbatts/tar-split v0.11.2 // indirect + go.opentelemetry.io/contrib v0.20.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 // indirect + go.opentelemetry.io/otel v0.20.0 // indirect + go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect + go.opentelemetry.io/otel/metric v0.20.0 // indirect + go.opentelemetry.io/otel/sdk v0.20.0 // indirect + go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect + go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect + go.opentelemetry.io/otel/trace v0.20.0 // indirect + go.opentelemetry.io/proto/otlp v0.7.0 // indirect golang.org/x/net v0.0.0-20220524220425-1d687d428aca // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect @@ -89,19 +107,25 @@ require ( golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect + google.golang.org/grpc v1.46.2 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.24.0 // indirect + k8s.io/apiserver v0.24.0 // indirect k8s.io/client-go v0.24.0 // indirect k8s.io/component-base v0.24.0 // indirect k8s.io/klog/v2 v2.60.1 // indirect k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30 // indirect sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect ) replace github.com/knqyf263/go-rpmdb => github.com/opdev/go-rpmdb v0.0.0-20220719131451-751902254f35 + +replace github.com/operator-framework/api v0.16.0 => github.com/operator-framework/api v0.16.1-0.20220823134246-5f99430d4ec4 diff --git a/go.sum b/go.sum index 64ef06e9e..e1685b5ab 100644 --- a/go.sum +++ b/go.sum @@ -93,6 +93,7 @@ github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e h1:GCzyKMDDjSGnlpl3clrdAK7I1AaVoaiKDOYkUzChZzg= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -101,6 +102,7 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= @@ -108,6 +110,7 @@ github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -141,7 +144,11 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= @@ -200,6 +207,7 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/esimonov/ifshort v1.0.3/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= @@ -213,6 +221,7 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -226,6 +235,7 @@ github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3n github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-critic/go-critic v0.6.1/go.mod h1:SdNCfU0yF3UBjtaZGw6586/WocupMOJuiqgom5DsQxM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -337,6 +347,7 @@ github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.10.1 h1:MQBGSZGnDwh7T/un+mzGKOMz3x+4E/GDPprWjDL+1Jg= github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= @@ -426,6 +437,7 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= @@ -665,8 +677,8 @@ github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e/go.mo github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 h1:ZHRIMCFIJN1p9LsJt4HQ+akDrys4PrYnXzOWI5LK03I= github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142/go.mod h1:fjS8r9mqDVsPb5td3NehsNOAWa4uiFkYEfVZioQ2gH0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/operator-framework/api v0.15.0 h1:4f9i0drtqHj7ykLoHxv92GR43S7MmQHhmFQkfm5YaGI= -github.com/operator-framework/api v0.15.0/go.mod h1:scnY9xqSeCsOdtJtNoHIXd7OtHZ14gj1hkDA4+DlgLY= +github.com/operator-framework/api v0.16.1-0.20220823134246-5f99430d4ec4 h1:juST/k+hHmKD/BlZ4GCzeDdxvNsxB4wHlDyfAPYmSrU= +github.com/operator-framework/api v0.16.1-0.20220823134246-5f99430d4ec4/go.mod h1:kk8xJahHJR3bKqrA+A+1VIrhOTmyV76k+ARv+iV+u1Q= github.com/operator-framework/operator-manifest-tools v0.2.1 h1:hD3iyOm2mBItzYhpFFWqU1StkolS4XGvXxRvFO4v3Oo= github.com/operator-framework/operator-manifest-tools v0.2.1/go.mod h1:C4AmRDIJiM8WVyGyqoUuK3KlloZr7XqaabKMMKKhHtA= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= @@ -806,6 +818,7 @@ github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhU github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -893,17 +906,28 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 h1:Q3C9yzW6I9jqEc8sawxzxZmY48fs9u220KXq6d5s3XU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0 h1:eaP0Fqu7SXHwvjiqDq83zImeehOHX8doTvU9AwXON8g= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0 h1:4kzhXFP+btKm4jwxpjIqjs41A7MakRFUS86bqLHTIw8= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiWzF6Vaeaw= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0 h1:JsxtGXd06J8jrnya7fdI/U/MR6yXA5DtbZy+qoHQlr8= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0 h1:c5VRjxCXdQlx1HjzwGdQHzZaVI82b5EbBgOu2ljD92g= go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0 h1:7ao1wpzHRVKf0OQ7GIxiQJA6X7DLX9o14gmVon7mMK8= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0 h1:1DL6EXUdcg95gukhuRRvLDO/4X5THh/5dIV52lqtnbw= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1409,6 +1433,8 @@ google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1438,6 +1464,9 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1513,6 +1542,7 @@ k8s.io/apiextensions-apiserver v0.24.0/go.mod h1:iuVe4aEpe6827lvO6yWQVxiPSpPoSKV k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.24.0 h1:ydFCyC/DjCvFCHK5OPMKBlxayQytB8pxy8YQInd5UyQ= k8s.io/apimachinery v0.24.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apiserver v0.24.0 h1:GR7kGsjOMfilRvlG3Stxv/3uz/ryvJ/aZXc5pqdsNV0= k8s.io/apiserver v0.24.0/go.mod h1:WFx2yiOMawnogNToVvUYT9nn1jaIkMKj41ZYCVycsBA= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.24.0 h1:lbE4aB1gTHvYFSwm6eD3OF14NhFDKCejlnsGYlSJe5U= @@ -1544,6 +1574,7 @@ mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30 h1:dUk62HQ3ZFhD48Qr8MIXCiKA8wInBQCtuE4QGfFW7yA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= sigs.k8s.io/controller-runtime v0.12.1 h1:4BJY01xe9zKQti8oRjj/NeHKRXthf1YkYJAgLONFFoI= sigs.k8s.io/controller-runtime v0.12.1/go.mod h1:BKhxlA4l7FPK4AQcsuL4X6vZeWnKDXez/vp1Y8dxTU0=