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 162e3f0a [dubbictl] Refactoring the directory structure manifest (#494)
162e3f0a is described below
commit 162e3f0a9fd26e31a6656b4eccf81c74a47096cb
Author: mfordjody <[email protected]>
AuthorDate: Tue Oct 29 11:23:50 2024 +0800
[dubbictl] Refactoring the directory structure manifest (#494)
---
dubboctl/cmd/manifest.go | 9 +++++----
.../{cmd/manifest_diff.go => pkg/manifest/diff.go} | 2 +-
.../manifest_generate.go => pkg/manifest/generate.go} | 2 +-
.../manifest_install.go => pkg/manifest/install.go} | 18 +++++++++---------
.../manifest/uninstall.go} | 18 +++++++++---------
5 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/dubboctl/cmd/manifest.go b/dubboctl/cmd/manifest.go
index fa4acecf..e5b545f9 100644
--- a/dubboctl/cmd/manifest.go
+++ b/dubboctl/cmd/manifest.go
@@ -16,6 +16,7 @@
package cmd
import (
+ "github.com/apache/dubbo-kubernetes/dubboctl/pkg/manifest"
"github.com/spf13/cobra"
)
@@ -25,9 +26,9 @@ func addManifest(rootCmd *cobra.Command) {
Short: "Commands related to manifest",
Long: "Commands help user to generate manifest and install
manifest",
}
- ConfigManifestGenerateCmd(manifestCmd)
- ConfigManifestInstallCmd(manifestCmd)
- ConfigManifestUninstallCmd(manifestCmd)
- ConfigManifestDiffCmd(manifestCmd)
+ manifest.ConfigManifestGenerateCmd(manifestCmd)
+ manifest.ConfigManifestInstallCmd(manifestCmd)
+ manifest.ConfigManifestUninstallCmd(manifestCmd)
+ manifest.ConfigManifestDiffCmd(manifestCmd)
rootCmd.AddCommand(manifestCmd)
}
diff --git a/dubboctl/cmd/manifest_diff.go b/dubboctl/pkg/manifest/diff.go
similarity index 99%
rename from dubboctl/cmd/manifest_diff.go
rename to dubboctl/pkg/manifest/diff.go
index b1942ff6..29c2e3eb 100644
--- a/dubboctl/cmd/manifest_diff.go
+++ b/dubboctl/pkg/manifest/diff.go
@@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package cmd
+package manifest
import (
"errors"
diff --git a/dubboctl/cmd/manifest_generate.go
b/dubboctl/pkg/manifest/generate.go
similarity index 99%
rename from dubboctl/cmd/manifest_generate.go
rename to dubboctl/pkg/manifest/generate.go
index fd69e96a..d4ec24ec 100644
--- a/dubboctl/cmd/manifest_generate.go
+++ b/dubboctl/pkg/manifest/generate.go
@@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package cmd
+package manifest
import (
"fmt"
diff --git a/dubboctl/cmd/manifest_install.go b/dubboctl/pkg/manifest/install.go
similarity index 91%
rename from dubboctl/cmd/manifest_install.go
rename to dubboctl/pkg/manifest/install.go
index a7671934..4067fc9b 100644
--- a/dubboctl/cmd/manifest_install.go
+++ b/dubboctl/pkg/manifest/install.go
@@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package cmd
+package manifest
import (
"github.com/spf13/cobra"
@@ -74,14 +74,14 @@ func ConfigManifestInstallCmd(baseCmd *cobra.Command) {
func installManifests(miArgs *ManifestInstallArgs, cfg *v1alpha1.DubboConfig)
error {
var cliOpts []kube.CtlClientOption
- if TestInstallFlag {
- cliOpts = []kube.CtlClientOption{kube.WithCli(TestCli)}
- } else {
- cliOpts = []kube.CtlClientOption{
- kube.WithKubeConfigPath(miArgs.KubeConfigPath),
- kube.WithContext(miArgs.Context),
- }
- }
+ //if cmd.TestInstallFlag {
+ // cliOpts = []kube.CtlClientOption{kube.WithCli(cmd.TestCli)}
+ //} else {
+ // cliOpts = []kube.CtlClientOption{
+ // kube.WithKubeConfigPath(miArgs.KubeConfigPath),
+ // kube.WithContext(miArgs.Context),
+ // }
+ //}
cli, err := kube.NewCtlClient(cliOpts...)
if err != nil {
return err
diff --git a/dubboctl/cmd/manifest_uninstall.go
b/dubboctl/pkg/manifest/uninstall.go
similarity index 91%
rename from dubboctl/cmd/manifest_uninstall.go
rename to dubboctl/pkg/manifest/uninstall.go
index 8d102159..d3e3f4ef 100644
--- a/dubboctl/cmd/manifest_uninstall.go
+++ b/dubboctl/pkg/manifest/uninstall.go
@@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package cmd
+package manifest
import (
"github.com/spf13/cobra"
@@ -71,14 +71,14 @@ func ConfigManifestUninstallCmd(baseCmd *cobra.Command) {
func uninstallManifests(muArgs *ManifestUninstallArgs, cfg
*v1alpha1.DubboConfig) error {
var cliOpts []kube.CtlClientOption
- if TestInstallFlag {
- cliOpts = []kube.CtlClientOption{kube.WithCli(TestCli)}
- } else {
- cliOpts = []kube.CtlClientOption{
- kube.WithKubeConfigPath(muArgs.KubeConfigPath),
- kube.WithContext(muArgs.Context),
- }
- }
+ //if cmd.TestInstallFlag {
+ // cliOpts = []kube.CtlClientOption{kube.WithCli(cmd.TestCli)}
+ //} else {
+ // cliOpts = []kube.CtlClientOption{
+ // kube.WithKubeConfigPath(muArgs.KubeConfigPath),
+ // kube.WithContext(muArgs.Context),
+ // }
+ //}
cli, err := kube.NewCtlClient(cliOpts...)
if err != nil {
return err