Skip to content

Commit

Permalink
Implement plugin phase 1.5
Browse files Browse the repository at this point in the history
Signed-off-by: Adrián Orive <[email protected]>
  • Loading branch information
Adirio committed Mar 1, 2021
1 parent d37a747 commit 2e62486
Show file tree
Hide file tree
Showing 168 changed files with 1,578 additions and 4,802 deletions.
9 changes: 6 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ require (
github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334
github.com/kr/text v0.1.0
github.com/markbates/inflect v1.0.4
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
github.com/onsi/ginkgo v1.15.0
github.com/onsi/gomega v1.10.5
github.com/operator-framework/api v0.5.3
github.com/operator-framework/operator-lib v0.4.0
github.com/operator-framework/operator-registry v1.15.3
Expand All @@ -22,7 +22,7 @@ require (
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.0
github.com/stretchr/testify v1.6.1
golang.org/x/tools v0.0.0-20201014231627-1610a49f37af
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e
gomodules.xyz/jsonpatch/v3 v3.0.1
helm.sh/helm/v3 v3.4.1
k8s.io/api v0.20.1
Expand All @@ -46,6 +46,9 @@ replace (
github.com/containerd/containerd => github.com/containerd/containerd v1.4.3
github.com/mattn/go-sqlite3 => github.com/mattn/go-sqlite3 v1.10.0
golang.org/x/text => golang.org/x/text v0.3.3 // Required to fix CVE-2020-14040

// Validating changes from KB
sigs.k8s.io/kubebuilder/v3 => github.com/Adirio/kubebuilder/v3 v3.0.0-alpha.0.0.20210301113100-ccb4e08add05
)

exclude github.com/spf13/viper v1.3.2 // Required to fix CVE-2018-1098
24 changes: 15 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Adirio/kubebuilder/v3 v3.0.0-alpha.0.0.20210301113100-ccb4e08add05 h1:4GQmDxlTgapFnz7rapcoLtqfSoyCHj0ShmOUbzanucY=
github.com/Adirio/kubebuilder/v3 v3.0.0-alpha.0.0.20210301113100-ccb4e08add05/go.mod h1:O+YpPPkBBBQ+H7b2W1SqL8ygxDHFrVanJICzV8ToZtE=
github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
Expand Down Expand Up @@ -721,6 +723,8 @@ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4=
github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4=
github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
Expand All @@ -731,6 +735,8 @@ github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoT
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs=
github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.10.5 h1:7n6FEkpFmfCoo2t+YYqXH0evK+a9ICQz0xcAy9dYcaQ=
github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
Expand Down Expand Up @@ -1083,10 +1089,11 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/LtIxf46G4fxeEz5KJr9U=
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand All @@ -1102,8 +1109,8 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -1165,6 +1172,8 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY=
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091 h1:DMyOG0U+gKfu8JZzg2UQe9MeaC1X+xQWlAKcRnjxjCw=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -1222,12 +1231,11 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200403190813-44a64ad78b9b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20201014231627-1610a49f37af h1:VIUWFyOgzG3c0t9KYop5Ybp4m56LupfOnFYX7Ipnz+I=
golang.org/x/tools v0.0.0-20201014231627-1610a49f37af/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e h1:4nW4NLDYnU28ojHaHO8OVxFHk/aQ33U01a9cjED+pzE=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down Expand Up @@ -1460,8 +1468,6 @@ sigs.k8s.io/controller-runtime v0.8.0/go.mod h1:v9Lbj5oX443uR7GXYY46E0EE2o7k2YxQ
sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI=
sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w=
sigs.k8s.io/controller-tools v0.4.1/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU=
sigs.k8s.io/kubebuilder/v3 v3.0.0-alpha.0.0.20210211121616-05abe25e7215 h1:pwEHSu3/ODNEr33DNrKt2DovGV84LhRBLt4QyrT6FJA=
sigs.k8s.io/kubebuilder/v3 v3.0.0-alpha.0.0.20210211121616-05abe25e7215/go.mod h1:b1WkCy5t/3VSRBCffSfPV1WbH+f45ls69d4ic37sW6w=
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ func (mh *MemcachedGoWithWebhooks) Prepare() {
func (mh *MemcachedGoWithWebhooks) Run() {
log.Infof("creating the project")
err := mh.ctx.Init(
"--project-version", "3",
"--plugins", "go/v2",
"--project-version", "3",
"--repo", "github.com/example/memcached-operator",
"--domain",
mh.ctx.Domain)
"--domain", mh.ctx.Domain)
pkg.CheckError("creating the project", err)

err = mh.ctx.CreateAPI(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ func (mh *MemcachedGoWithWebhooks) Prepare() {
func (mh *MemcachedGoWithWebhooks) Run() {
log.Infof("creating the project")
err := mh.ctx.Init(
"--project-version", "3",
"--plugins", "go/v3",
"--project-version", "3",
"--repo", "github.com/example/memcached-operator",
"--domain",
mh.ctx.Domain)
"--domain", mh.ctx.Domain)
pkg.CheckError("creating the project", err)

err = mh.ctx.CreateAPI(
Expand Down
51 changes: 37 additions & 14 deletions internal/cmd/operator-sdk/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,56 +19,79 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"sigs.k8s.io/kubebuilder/v3/pkg/cli"
cfgv2 "sigs.k8s.io/kubebuilder/v3/pkg/config/v2"
cfgv3 "sigs.k8s.io/kubebuilder/v3/pkg/config/v3"
"sigs.k8s.io/kubebuilder/v3/pkg/plugin"
golangv2 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v2"
golangv3 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3"

"github.com/operator-framework/operator-sdk/internal/cmd/operator-sdk/bundle"
"github.com/operator-framework/operator-sdk/internal/cmd/operator-sdk/cleanup"
"github.com/operator-framework/operator-sdk/internal/cmd/operator-sdk/completion"
"github.com/operator-framework/operator-sdk/internal/cmd/operator-sdk/generate"
"github.com/operator-framework/operator-sdk/internal/cmd/operator-sdk/olm"
"github.com/operator-framework/operator-sdk/internal/cmd/operator-sdk/run"
"github.com/operator-framework/operator-sdk/internal/cmd/operator-sdk/scorecard"
"github.com/operator-framework/operator-sdk/internal/flags"
"github.com/operator-framework/operator-sdk/internal/plugins"
ansiblev1 "github.com/operator-framework/operator-sdk/internal/plugins/ansible/v1"
golangv2 "github.com/operator-framework/operator-sdk/internal/plugins/golang/v2"
golangv3 "github.com/operator-framework/operator-sdk/internal/plugins/golang/v3"
envtestv1 "github.com/operator-framework/operator-sdk/internal/plugins/envtest/v1"
helmv1 "github.com/operator-framework/operator-sdk/internal/plugins/helm/v1"
manifestsv1 "github.com/operator-framework/operator-sdk/internal/plugins/manifests/v1"
scorecardv1 "github.com/operator-framework/operator-sdk/internal/plugins/scorecard/v1"
"github.com/operator-framework/operator-sdk/internal/util/projutil"
)

var commands = []*cobra.Command{
bundle.NewCmd(),
cleanup.NewCmd(),
completion.NewCmd(),
generate.NewCmd(),
olm.NewCmd(),
run.NewCmd(),
scorecard.NewCmd(),
}

func Run() error {
cli, _ := GetPluginsCLIAndRoot()
return cli.Run()
c, _ := GetPluginsCLIAndRoot()
return c.Run()
}

// GetPluginsCLIAndRoot returns the plugins based CLI configured to use operator-sdk as the root command
// This CLI can run kubebuilder commands and certain SDK specific commands that are aligned for
// the kubebuilder project layout
func GetPluginsCLIAndRoot() (cli.CLI, *cobra.Command) {
ansibleBundle, _ := plugin.NewBundle("ansible" + plugins.DefaultNameQualifier, plugin.Version{Number: 1},
&ansiblev1.Plugin{},
&manifestsv1.Plugin{},
&scorecardv1.Plugin{},
)
gov2Bundle, _ := plugin.NewBundle("go" + plugins.DefaultNameQualifier, plugin.Version{Number: 2},
&golangv2.Plugin{},
&envtestv1.Plugin{},
&manifestsv1.Plugin{},
&scorecardv1.Plugin{},
)
gov3Bundle, _ := plugin.NewBundle("go" + plugins.DefaultNameQualifier, plugin.Version{Number: 3},
&golangv2.Plugin{},
&manifestsv1.Plugin{},
&scorecardv1.Plugin{},
)
helmBundle, _ := plugin.NewBundle("helm" + plugins.DefaultNameQualifier, plugin.Version{Number: 1},
&helmv1.Plugin{},
&manifestsv1.Plugin{},
&scorecardv1.Plugin{},
)
c, err := cli.New(
cli.WithCommandName("operator-sdk"),
cli.WithVersion(makeVersionString()),
cli.WithDefaultProjectVersion(cfgv3.Version),
cli.WithPlugins(
&golangv2.Plugin{},
&golangv3.Plugin{},
&helmv1.Plugin{},
&ansiblev1.Plugin{},
ansibleBundle,
gov2Bundle,
gov3Bundle,
helmBundle,
),
cli.WithDefaultPlugins(cfgv2.Version, &golangv2.Plugin{}),
cli.WithDefaultPlugins(cfgv3.Version, &golangv3.Plugin{}),
cli.WithDefaultPlugins(&golangv3.Plugin{}, &manifestsv1.Plugin{}, &scorecardv1.Plugin{}),
cli.WithDefaultProjectVersion(cfgv3.Version),
cli.WithExtraCommands(commands...),
cli.WithCompletion(),
)
if err != nil {
log.Fatal(err)
Expand Down
35 changes: 0 additions & 35 deletions internal/cmd/operator-sdk/completion/bash.go

This file was deleted.

31 changes: 0 additions & 31 deletions internal/cmd/operator-sdk/completion/bash_test.go

This file was deleted.

29 changes: 0 additions & 29 deletions internal/cmd/operator-sdk/completion/cmd.go

This file was deleted.

34 changes: 0 additions & 34 deletions internal/cmd/operator-sdk/completion/cmd_test.go

This file was deleted.

27 changes: 0 additions & 27 deletions internal/cmd/operator-sdk/completion/completion_suite_test.go

This file was deleted.

Loading

0 comments on commit 2e62486

Please sign in to comment.