Skip to content

Commit b8a23ba

Browse files
author
Eric Stroczynski
authored
scorecard: use api repo v1alpha3 API, remove existing (#3622)
This commit removes the scorecard API from this repo, and changes import paths to the API's new location in the api repo. *: update import paths pkg/: remove go.mod,go.sum: update api repo version to commit containing scorecard API
1 parent 533a275 commit b8a23ba

File tree

34 files changed

+44
-845
lines changed

34 files changed

+44
-845
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
entries:
2+
- description: >
3+
Moved scorecard API v1alpha3 to the [api repo](https://github.com/operator-framework/api)
4+
under `pkg/apis/scorecard/v1alpha3`. All future scorecard APIs will be released in this repo.
5+
kind: removal
6+
breaking: true
7+
migration:
8+
header: Update scorecard API Go import paths
9+
body: >
10+
The scorecard v1alpha3 API has been moved to a separate repo. Update your Go import paths:
11+
From: `github.com/operator-framework/operator-framework/pkg/apis/scorecard/v1alpha3`
12+
To: `github.com/operator-framework/api/pkg/apis/scorecard/v1alpha3`

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ require (
99
github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334
1010
github.com/kr/text v0.1.0
1111
github.com/markbates/inflect v1.0.4
12-
github.com/mattn/go-isatty v0.0.12
1312
github.com/onsi/ginkgo v1.12.1
1413
github.com/onsi/gomega v1.10.1
15-
github.com/operator-framework/api v0.3.8
14+
github.com/operator-framework/api v0.3.12-0.20200731162302-333d0644352a
1615
github.com/operator-framework/operator-lib v0.1.0
1716
github.com/operator-framework/operator-registry v1.13.4
1817
github.com/prometheus/client_golang v1.5.1

go.sum

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,8 @@ github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx
492492
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
493493
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
494494
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
495+
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
495496
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
496-
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
497-
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
498497
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
499498
github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
500499
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
@@ -573,12 +572,12 @@ github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.m
573572
github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs=
574573
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
575574
github.com/operator-framework/api v0.3.7-0.20200602203552-431198de9fc2/go.mod h1:Xbje9x0SHmh0nihE21kpesB38vk3cyxnE6JdDS8Jo1Q=
576-
github.com/operator-framework/api v0.3.8 h1:tJykTCmwGKZBsPVTCfxbwz6nTF6dzmKydWJtC40erc8=
577-
github.com/operator-framework/api v0.3.8/go.mod h1:Xbje9x0SHmh0nihE21kpesB38vk3cyxnE6JdDS8Jo1Q=
578-
github.com/operator-framework/operator-registry v1.13.4 h1:GH7essHnVRP4kYgAWYV9obsS0Cnaj/KjT3BmQXmKAOE=
579-
github.com/operator-framework/operator-registry v1.13.4/go.mod h1:YhnIzOVjRU2ZwZtzt+fjcjW8ujJaSFynBEu7QVKaSdU=
575+
github.com/operator-framework/api v0.3.12-0.20200731162302-333d0644352a h1:x/oRKFmHiAAkNUNEeVcmlCfSFcJBtWSuWT7UcrnqQ7U=
576+
github.com/operator-framework/api v0.3.12-0.20200731162302-333d0644352a/go.mod h1:Xbje9x0SHmh0nihE21kpesB38vk3cyxnE6JdDS8Jo1Q=
580577
github.com/operator-framework/operator-lib v0.1.0 h1:7Qy6v2ZccvCeFLWEkrGnN+U+DkaeIWp0gAZaBM9T3DI=
581578
github.com/operator-framework/operator-lib v0.1.0/go.mod h1:HLw61JTIEeq0YLeVf4dwYx/zt4DmLGZUVWI1y3Lf5Hg=
579+
github.com/operator-framework/operator-registry v1.13.4 h1:GH7essHnVRP4kYgAWYV9obsS0Cnaj/KjT3BmQXmKAOE=
580+
github.com/operator-framework/operator-registry v1.13.4/go.mod h1:YhnIzOVjRU2ZwZtzt+fjcjW8ujJaSFynBEu7QVKaSdU=
582581
github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k=
583582
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
584583
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
@@ -860,7 +859,6 @@ golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2/go.mod h1:h1NjWce9XRLGQEsW7w
860859
golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
861860
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
862861
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
863-
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
864862
golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
865863
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
866864
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

images/scorecard-test-kuttl/cmd/test-kuttl/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"log"
2424
"os"
2525

26-
"github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha3"
26+
"github.com/operator-framework/api/pkg/apis/scorecard/v1alpha3"
2727
)
2828

2929
// The scorecard test kuttl binary processes the

images/scorecard-test/cmd/test/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import (
2020
"log"
2121
"os"
2222

23+
scapiv1alpha3 "github.com/operator-framework/api/pkg/apis/scorecard/v1alpha3"
2324
apimanifests "github.com/operator-framework/api/pkg/manifests"
2425

2526
registryutil "github.com/operator-framework/operator-sdk/internal/registry"
2627
"github.com/operator-framework/operator-sdk/internal/scorecard"
2728
"github.com/operator-framework/operator-sdk/internal/scorecard/tests"
28-
scapiv1alpha3 "github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha3"
2929
)
3030

3131
// this is the scorecard test binary that ultimately executes the

internal/cmd/operator-sdk/generate/bundle/bundle.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"sort"
2424
"strings"
2525

26+
"github.com/operator-framework/api/pkg/apis/scorecard/v1alpha3"
2627
"github.com/operator-framework/operator-registry/pkg/lib/bundle"
2728
"sigs.k8s.io/kubebuilder/pkg/model/config"
2829
"sigs.k8s.io/yaml"
@@ -35,7 +36,6 @@ import (
3536
"github.com/operator-framework/operator-sdk/internal/registry"
3637
"github.com/operator-framework/operator-sdk/internal/scorecard"
3738
"github.com/operator-framework/operator-sdk/internal/util/projutil"
38-
"github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha3"
3939
)
4040

4141
const (

internal/cmd/operator-sdk/scorecard/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"path/filepath"
2525
"time"
2626

27+
"github.com/operator-framework/api/pkg/apis/scorecard/v1alpha3"
2728
log "github.com/sirupsen/logrus"
2829
"github.com/spf13/cobra"
2930
"github.com/spf13/viper"
@@ -33,7 +34,6 @@ import (
3334
"github.com/operator-framework/operator-sdk/internal/flags"
3435
registryutil "github.com/operator-framework/operator-sdk/internal/registry"
3536
"github.com/operator-framework/operator-sdk/internal/scorecard"
36-
"github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha3"
3737
)
3838

3939
type scorecardCmd struct {

internal/generate/collector/collect.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"os"
2424
"path/filepath"
2525

26+
scorecardv1alpha3 "github.com/operator-framework/api/pkg/apis/scorecard/v1alpha3"
2627
log "github.com/sirupsen/logrus"
2728
admissionregv1 "k8s.io/api/admissionregistration/v1"
2829
appsv1 "k8s.io/api/apps/v1"
@@ -33,7 +34,6 @@ import (
3334
"sigs.k8s.io/yaml"
3435

3536
"github.com/operator-framework/operator-sdk/internal/util/k8sutil"
36-
scorecardv1alpha3 "github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha3"
3737
)
3838

3939
// Manifests holds a collector of all manifests relevant to CSV updates.
@@ -59,7 +59,7 @@ var (
5959
v1beta1crdGK = apiextv1beta1.SchemeGroupVersion.WithKind("CustomResourceDefinition").GroupKind()
6060
validatingWebhookCfgGK = admissionregv1.SchemeGroupVersion.WithKind("ValidatingWebhookConfiguration").GroupKind()
6161
mutatingWebhookCfgGK = admissionregv1.SchemeGroupVersion.WithKind("MutatingWebhookConfiguration").GroupKind()
62-
v1alpha3ScorecardCfgGK = scorecardv1alpha3.SchemeGroupVersion.WithKind("Configuration").GroupKind()
62+
v1alpha3ScorecardCfgGK = scorecardv1alpha3.GroupVersion.WithKind("Configuration").GroupKind()
6363
)
6464

6565
// UpdateFromDirs adds Roles, ClusterRoles, Deployments, and Custom Resource examples

internal/plugins/scorecard/init.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ import (
2222
"path/filepath"
2323
"text/template"
2424

25+
"github.com/operator-framework/api/pkg/apis/scorecard/v1alpha3"
2526
"k8s.io/apimachinery/pkg/runtime/schema"
2627
"sigs.k8s.io/kubebuilder/pkg/model/config"
2728
"sigs.k8s.io/yaml"
2829

2930
"github.com/operator-framework/operator-sdk/internal/plugins/util/kustomize"
3031
"github.com/operator-framework/operator-sdk/internal/scorecard"
31-
"github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha3"
3232
)
3333

3434
const (
@@ -115,7 +115,7 @@ func generate(testImageTag, outputDir string) error {
115115
}
116116
kustomizationValues.ResourcePaths = append(kustomizationValues.ResourcePaths, relBasePath)
117117
scorecardConfigTarget := patchTarget{
118-
GroupVersionKind: v1alpha3.SchemeGroupVersion.WithKind(v1alpha3.ConfigurationKind),
118+
GroupVersionKind: v1alpha3.GroupVersion.WithKind(v1alpha3.ConfigurationKind),
119119
Name: defaultConfigName,
120120
}
121121

@@ -187,7 +187,7 @@ type jsonPatchObject struct {
187187
// newConfigurationBase returns a scorecard componentconfig object with one parallel stage.
188188
// The returned object is intended to be marshaled and written to disk as a kustomize base.
189189
func newConfigurationBase(configName string) (cfg v1alpha3.Configuration) {
190-
cfg.SetGroupVersionKind(v1alpha3.SchemeGroupVersion.WithKind(v1alpha3.ConfigurationKind))
190+
cfg.SetGroupVersionKind(v1alpha3.GroupVersion.WithKind(v1alpha3.ConfigurationKind))
191191
cfg.Metadata.Name = configName
192192
cfg.Stages = []v1alpha3.StageConfiguration{
193193
{

internal/scorecard/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ package scorecard
1717
import (
1818
"io/ioutil"
1919

20+
"github.com/operator-framework/api/pkg/apis/scorecard/v1alpha3"
2021
"sigs.k8s.io/yaml"
21-
22-
"github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha3"
2322
)
2423

2524
const (

0 commit comments

Comments
 (0)