@@ -21,13 +21,9 @@ import (
21
21
log "github.com/sirupsen/logrus"
22
22
"k8s.io/apimachinery/pkg/runtime/schema"
23
23
"sigs.k8s.io/kubebuilder/v4/pkg/cli"
24
- cfgv3 "sigs.k8s.io/kubebuilder/v4/pkg/config/v3"
25
- "sigs.k8s.io/kubebuilder/v4/pkg/plugin"
26
- kustomizev2 "sigs.k8s.io/kubebuilder/v4/pkg/plugins/common/kustomize/v2"
27
- "sigs.k8s.io/kubebuilder/v4/pkg/plugins/golang"
28
24
29
25
"github.com/operator-framework/ansible-operator-plugins/hack/generate/samples/internal/pkg"
30
- "github.com/operator-framework/ansible-operator-plugins/pkg/plugins /ansible/v1 "
26
+ "github.com/operator-framework/ansible-operator-plugins/internal/cmd /ansible-operator/scaffold "
31
27
"github.com/operator-framework/ansible-operator-plugins/pkg/testutils/command"
32
28
"github.com/operator-framework/ansible-operator-plugins/pkg/testutils/e2e"
33
29
"github.com/operator-framework/ansible-operator-plugins/pkg/testutils/sample"
@@ -43,24 +39,7 @@ var memcachedGVK = schema.GroupVersionKind{
43
39
}
44
40
45
41
func getCli () * cli.CLI {
46
- ansibleBundle , _ := plugin .NewBundleWithOptions (
47
- plugin .WithName (golang .DefaultNameQualifier ),
48
- plugin .WithVersion (ansible.Plugin {}.Version ()),
49
- plugin .WithPlugins (kustomizev2.Plugin {}, ansible.Plugin {}),
50
- )
51
-
52
- c , err := cli .New (
53
- cli .WithCommandName ("cli" ),
54
- cli .WithVersion ("v0.0.0" ),
55
- cli .WithPlugins (
56
- ansibleBundle ,
57
- ),
58
- cli .WithDefaultPlugins (cfgv3 .Version , ansibleBundle ),
59
- cli .WithDefaultProjectVersion (cfgv3 .Version ),
60
- cli .WithCompletion (),
61
- )
62
- pkg .CheckError ("getting cli implementation:" , err )
63
- return c
42
+ return scaffold .GetPluginsCLI ()
64
43
}
65
44
66
45
func GenerateMemcachedSamples (rootPath string ) []sample.Sample {
0 commit comments