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 10220f95 [operator] Optimize installation and uninstallation fields
10220f95 is described below
commit 10220f95b845a19cd756df514937a57a24cffe6b
Author: mfordjody <[email protected]>
AuthorDate: Thu Dec 19 11:51:11 2024 +0800
[operator] Optimize installation and uninstallation fields
---
operator/cmd/cluster/install.go | 8 ++------
operator/cmd/cluster/uninstall.go | 4 ++++
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/operator/cmd/cluster/install.go b/operator/cmd/cluster/install.go
index 6b178aed..521ee40c 100644
--- a/operator/cmd/cluster/install.go
+++ b/operator/cmd/cluster/install.go
@@ -15,7 +15,6 @@ import (
"io"
"os"
"strings"
- "time"
)
var installerScope = log.RegisterScope("installer", "installer")
@@ -23,17 +22,14 @@ var installerScope = log.RegisterScope("installer",
"installer")
type installArgs struct {
Files []string
Sets []string
- Revision string
ManifestPath string
SkipConfirmation bool
- ReadinessTimeout time.Duration
}
func (i *installArgs) String() string {
var b strings.Builder
b.WriteString("Files: " + (fmt.Sprint(i.Files) + "\n"))
b.WriteString("Sets: " + (fmt.Sprint(i.Sets) + "\n"))
- b.WriteString("Revision: " + (fmt.Sprint(i.Revision) + "\n"))
b.WriteString("ManifestPath: " + (fmt.Sprint(i.ManifestPath) + "\n"))
return b.String()
}
@@ -81,7 +77,7 @@ dubboctl install -f my-config.yaml
}
func Install(kubeClient kube.CLIClient, rootArgs *RootArgs, iArgs
*installArgs, cl clog.Logger, stdOut io.Writer, p Printer) error {
- setFlags := applyFlagAliases(iArgs.Sets, iArgs.ManifestPath,
iArgs.Revision)
+ setFlags := applyFlagAliases(iArgs.Sets, iArgs.ManifestPath)
manifests, vals, err := render.GenerateManifest(iArgs.Files, setFlags,
cl, kubeClient)
if err != nil {
return fmt.Errorf("generate config: %v", err)
@@ -108,7 +104,7 @@ func Install(kubeClient kube.CLIClient, rootArgs *RootArgs,
iArgs *installArgs,
return nil
}
-func applyFlagAliases(flags []string, manifestsPath string, revision string)
[]string {
+func applyFlagAliases(flags []string, manifestsPath string) []string {
if manifestsPath != "" {
flags = append(flags, fmt.Sprintf("manifestsPath=%s",
manifestsPath))
}
diff --git a/operator/cmd/cluster/uninstall.go
b/operator/cmd/cluster/uninstall.go
index 00794f18..a95960de 100644
--- a/operator/cmd/cluster/uninstall.go
+++ b/operator/cmd/cluster/uninstall.go
@@ -6,6 +6,10 @@ import (
)
type uninstallArgs struct {
+ files []string
+ sets []string
+ manifestPath string
+ purge bool
}
func addUninstallFlags() {