|
| 1 | +diff --git a/go.mod b/go.mod |
| 2 | +index 12ba033a..2a1aeaa7 100644 |
| 3 | +--- a/go.mod |
| 4 | ++++ b/go.mod |
| 5 | +@@ -7,13 +7,14 @@ require ( |
| 6 | + github.com/fatih/structtag v1.1.0 |
| 7 | + github.com/go-logr/logr v0.4.0 |
| 8 | + github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 |
| 9 | +- github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334 |
| 10 | ++ github.com/iancoleman/strcase v0.1.2 |
| 11 | + github.com/kr/text v0.2.0 |
| 12 | + github.com/markbates/inflect v1.0.4 |
| 13 | + github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2 |
| 14 | + github.com/onsi/ginkgo v1.16.4 |
| 15 | + github.com/onsi/gomega v1.13.0 |
| 16 | + github.com/operator-framework/api v0.10.5 |
| 17 | ++ github.com/operator-framework/helm-operator-plugins v0.0.8-0.20210825183301-ae6656410e15 |
| 18 | + github.com/operator-framework/java-operator-plugins v0.0.0-20210708174638-463fb91f3d5e |
| 19 | + github.com/operator-framework/operator-lib v0.6.0 |
| 20 | + github.com/operator-framework/operator-registry v1.17.4 |
| 21 | +@@ -54,6 +55,8 @@ replace ( |
| 22 | + github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d |
| 23 | + github.com/mattn/go-sqlite3 => github.com/mattn/go-sqlite3 v1.10.0 |
| 24 | + golang.org/x/text => golang.org/x/text v0.3.3 // Required to fix CVE-2020-14040 |
| 25 | ++ |
| 26 | ++ github.com/operator-framework/helm-operator-plugins => REPLACE_ME_WITH_PATH |
| 27 | + ) |
| 28 | + |
| 29 | + exclude github.com/spf13/viper v1.3.2 // Required to fix CVE-2018-1098 |
| 30 | +diff --git a/internal/cmd/operator-sdk/cli/cli.go b/internal/cmd/operator-sdk/cli/cli.go |
| 31 | +index 0f4e5f69..cce04188 100644 |
| 32 | +--- a/internal/cmd/operator-sdk/cli/cli.go |
| 33 | ++++ b/internal/cmd/operator-sdk/cli/cli.go |
| 34 | +@@ -26,6 +26,7 @@ import ( |
| 35 | + kustomizev1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v1" |
| 36 | + declarativev1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/declarative/v1" |
| 37 | + |
| 38 | ++ "sigs.k8s.io/kubebuilder/v3/pkg/model/stage" |
| 39 | + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang" |
| 40 | + golangv2 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v2" |
| 41 | + golangv3 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3" |
| 42 | +@@ -46,6 +47,8 @@ import ( |
| 43 | + manifestsv2 "github.com/operator-framework/operator-sdk/internal/plugins/manifests/v2" |
| 44 | + scorecardv2 "github.com/operator-framework/operator-sdk/internal/plugins/scorecard/v2" |
| 45 | + "github.com/operator-framework/operator-sdk/internal/util/projutil" |
| 46 | ++ |
| 47 | ++ hybrid "github.com/operator-framework/helm-operator-plugins/pkg/plugins/hybrid/v1alpha" |
| 48 | + ) |
| 49 | + |
| 50 | + var ( |
| 51 | +@@ -98,6 +101,12 @@ func GetPluginsCLIAndRoot() (*cli.CLI, *cobra.Command) { |
| 52 | + manifestsv2.Plugin{}, |
| 53 | + scorecardv2.Plugin{}, |
| 54 | + ) |
| 55 | ++ hybridHelmBundle, _ := plugin.NewBundle("hybrid.helm"+plugins.DefaultNameQualifier, plugin.Version{Number: 1, Stage: stage.Alpha}, |
| 56 | ++ kustomizev1.Plugin{}, |
| 57 | ++ hybrid.Plugin{}, |
| 58 | ++ manifestsv2.Plugin{}, |
| 59 | ++ scorecardv2.Plugin{}, |
| 60 | ++ ) |
| 61 | + c, err := cli.New( |
| 62 | + cli.WithCommandName("operator-sdk"), |
| 63 | + cli.WithVersion(makeVersionString()), |
| 64 | +@@ -106,6 +115,7 @@ func GetPluginsCLIAndRoot() (*cli.CLI, *cobra.Command) { |
| 65 | + gov2Bundle, |
| 66 | + gov3Bundle, |
| 67 | + helmBundle, |
| 68 | ++ hybridHelmBundle, |
| 69 | + kustomizev1.Plugin{}, |
| 70 | + declarativev1.Plugin{}, |
| 71 | + &quarkusv1.Plugin{}, |
| 72 | +diff --git a/internal/util/projutil/project_util.go b/internal/util/projutil/project_util.go |
| 73 | +index af0db0e4..966afd35 100644 |
| 74 | +--- a/internal/util/projutil/project_util.go |
| 75 | ++++ b/internal/util/projutil/project_util.go |
| 76 | +@@ -55,6 +55,8 @@ const ( |
| 77 | + OperatorTypeAnsible OperatorType = "ansible" |
| 78 | + // OperatorTypeHelm - helm type of operator. |
| 79 | + OperatorTypeHelm OperatorType = "helm" |
| 80 | ++ // OperatorTypeHybridHelm - hybrid helm type of operator. |
| 81 | ++ OperatorTypeHybridHelm OperatorType = "hybrid.helm" |
| 82 | + // OperatorTypeUnknown - unknown type of operator. |
| 83 | + OperatorTypeUnknown OperatorType = "unknown" |
| 84 | + ) |
| 85 | +@@ -103,6 +105,8 @@ func PluginChainToOperatorType(pluginKeys []string) OperatorType { |
| 86 | + return OperatorTypeGo |
| 87 | + case strings.HasPrefix(pluginKey, "helm"): |
| 88 | + return OperatorTypeHelm |
| 89 | ++ case strings.HasPrefix(pluginKey, "hybrid.helm"): |
| 90 | ++ return OperatorTypeHybridHelm |
| 91 | + case strings.HasPrefix(pluginKey, "ansible"): |
| 92 | + return OperatorTypeAnsible |
| 93 | + } |
0 commit comments