This is an automated email from the ASF dual-hosted git repository.
zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git
The following commit(s) were added to refs/heads/master by this push:
new 73be20ad [operator] remove manifestPath sub options (#627)
73be20ad is described below
commit 73be20ad1f909703430ff184ffeef96943d06a06
Author: Jian Zhong <[email protected]>
AuthorDate: Wed Feb 26 12:28:48 2025 +0800
[operator] remove manifestPath sub options (#627)
---
operator/cmd/cluster/install.go | 8 ++------
operator/cmd/cluster/manifest.go | 9 +++------
operator/cmd/cluster/uninstall.go | 2 +-
3 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/operator/cmd/cluster/install.go b/operator/cmd/cluster/install.go
index 5faa1d19..4d48b705 100644
--- a/operator/cmd/cluster/install.go
+++ b/operator/cmd/cluster/install.go
@@ -23,7 +23,6 @@ var InstallerScope = log.RegisterScope("installer")
type installArgs struct {
files []string
sets []string
- manifestPath string
waitTimeout time.Duration
skipConfirmation bool
}
@@ -80,7 +79,7 @@ func InstallCmdWithArgs(ctx cli.Context, rootArgs *RootArgs,
iArgs *installArgs)
}
func Install(kubeClient kube.CLIClient, rootArgs *RootArgs, iArgs
*installArgs, cl clog.Logger, stdOut io.Writer, p Printer) error {
- setFlags := applyFlagAliases(iArgs.sets, iArgs.manifestPath)
+ setFlags := applyFlagAliases(iArgs.sets)
manifests, vals, err := render.GenerateManifest(iArgs.files, setFlags,
cl, kubeClient)
if err != nil {
return fmt.Errorf("generate config: %v", err)
@@ -108,9 +107,6 @@ func Install(kubeClient kube.CLIClient, rootArgs *RootArgs,
iArgs *installArgs,
return nil
}
-func applyFlagAliases(flags []string, manifestsPath string) []string {
- if manifestsPath != "" {
- flags = append(flags, fmt.Sprintf("manifestsPath=%s",
manifestsPath))
- }
+func applyFlagAliases(flags []string) []string {
return flags
}
diff --git a/operator/cmd/cluster/manifest.go b/operator/cmd/cluster/manifest.go
index 2257fc15..6983099b 100644
--- a/operator/cmd/cluster/manifest.go
+++ b/operator/cmd/cluster/manifest.go
@@ -15,23 +15,20 @@ import (
)
type manifestGenerateArgs struct {
- files []string
- sets []string
- manifestPath string
+ files []string
+ sets []string
}
func (a *manifestGenerateArgs) String() string {
var b strings.Builder
b.WriteString("filenames: " + fmt.Sprint(a.files) + "\n")
b.WriteString("sets: " + fmt.Sprint(a.sets) + "\n")
- b.WriteString("manifestPath: " + a.manifestPath + "\n")
return b.String()
}
func addManifestGenerateFlags(cmd *cobra.Command, args *manifestGenerateArgs) {
cmd.PersistentFlags().StringSliceVarP(&args.files, "filename", "f",
nil, ``)
cmd.PersistentFlags().StringArrayVarP(&args.sets, "set", "s", nil, ``)
- cmd.PersistentFlags().StringVarP(&args.manifestPath, "manifests", "d",
"", ``)
}
func ManifestCmd(ctx cli.Context) *cobra.Command {
@@ -85,7 +82,7 @@ const (
)
func manifestGenerate(kc kube.CLIClient, mgArgs *manifestGenerateArgs, cl
clog.Logger) error {
- setFlags := applyFlagAliases(mgArgs.sets, mgArgs.manifestPath)
+ setFlags := applyFlagAliases(mgArgs.sets)
manifests, _, err := render.GenerateManifest(mgArgs.files, setFlags,
cl, kc)
if err != nil {
return err
diff --git a/operator/cmd/cluster/uninstall.go
b/operator/cmd/cluster/uninstall.go
index 01e72922..b2121bf0 100644
--- a/operator/cmd/cluster/uninstall.go
+++ b/operator/cmd/cluster/uninstall.go
@@ -73,7 +73,7 @@ func Uninstall(cmd *cobra.Command, ctx cli.Context, rootArgs
*RootArgs, uiArgs *
cl.LogAndPrint("Purge uninstall will remove all Dubbo
resources, ignoring the specified revision or operator file")
}
- setFlags := applyFlagAliases(uiArgs.sets, uiArgs.manifestPath)
+ setFlags := applyFlagAliases(uiArgs.sets)
files := []string{}
if uiArgs.files != "" {