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 a932953c [dubboctl] Deletion of obsolete resources v2 and add logger 
logic
a932953c is described below

commit a932953cbb2d0fb9b3b95c792fbbc9ac96db5c4c
Author: mfordjody <[email protected]>
AuthorDate: Wed Jan 1 09:35:35 2025 +0800

    [dubboctl] Deletion of obsolete resources v2 and add logger logic
---
 dubboctl/cmd/common.go                             |  26 ---
 dubboctl/cmd/manifest.go                           |  29 ----
 dubboctl/cmd/manifest_test.go                      | 191 ---------------------
 dubboctl/cmd/profile.go                            |  28 ---
 dubboctl/cmd/profile_test.go                       | 151 ----------------
 dubboctl/cmd/testdata/customization/user.yaml      |  23 ---
 dubboctl/cmd/testdata/diff/profileA.yaml           |  25 ---
 dubboctl/cmd/testdata/diff/profileB.yaml           |  25 ---
 dubboctl/cmd/testdata/profile/test0.yaml           |  27 ---
 dubboctl/cmd/testdata/profile/test1.yaml           |  25 ---
 .../cmd/testdata/profile/test2_wrong_format.yaml   |  25 ---
 dubboctl/cmd/testdata/repository.git/HEAD          |   1 -
 dubboctl/cmd/testdata/repository.git/config        |   6 -
 dubboctl/cmd/testdata/repository.git/description   |   1 -
 .../cmd/testdata/repository.git/hooks/.gitinclude  |   0
 dubboctl/cmd/testdata/repository.git/info/exclude  |   6 -
 dubboctl/cmd/testdata/repository.git/info/refs     |   1 -
 .../00/9641334a89d30963a68442a132e5f8ef389ba8      | Bin 48 -> 0 bytes
 .../25/128199189ce87956e5e41fa8113bbf5cb6c39a      | Bin 83 -> 0 bytes
 .../27/d75d0e58009a59e1ff8a52a3297e1e0574138b      | Bin 46 -> 0 bytes
 .../43/0739f6d9930f74a6aef1a410f0f0727d171cef      | Bin 56 -> 0 bytes
 .../67/00ea8078422674e91189c1b513d1ab0696b150      | Bin 783 -> 0 bytes
 .../6f/6a77b977041c978dbdd431f9e7b2952c6908a3      | Bin 818 -> 0 bytes
 .../8b/57110b1cc8f2019ca4b2ed51a450ee0873eaaf      |   4 -
 .../98/68959b2b456ac7767bf351a84b369f9fbadb3a      | Bin 790 -> 0 bytes
 .../9a/c29c7ad8c06fa6613b794521568fbd7ea007dd      | Bin 787 -> 0 bytes
 .../b2/7e306a552e80fcae0bfa959bd6e8652de70c69      | Bin 58 -> 0 bytes
 .../b7/5832d0a4a4bb0409cca573b2c97b017d088f90      | Bin 48 -> 0 bytes
 .../c7/e84596af04680b8e7a39b9a527f19ccd75f287      | Bin 466 -> 0 bytes
 .../ca/1a6296f97eced6c9497d05598ef508852cac5d      | Bin 83 -> 0 bytes
 .../ca/5019f945b1d769d042c5f87d39f5d7a15f290c      | Bin 60 -> 0 bytes
 .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391      | Bin 15 -> 0 bytes
 .../f3/a9c97a29b561e7d72668581ea82284de2f1ca0      | Bin 111 -> 0 bytes
 .../cmd/testdata/repository.git/objects/info/packs |   1 -
 dubboctl/cmd/testdata/repository.git/packed-refs   |   2 -
 .../cmd/testdata/repository.git/refs/heads/main    |   1 -
 .../testdata/repository.git/refs/tags/.gitinclude  |   0
 operator/pkg/uninstall/uninstaller.go              |   8 +-
 operator/pkg/util/clog/log/option.go               |   2 +
 39 files changed, 6 insertions(+), 602 deletions(-)

diff --git a/dubboctl/cmd/common.go b/dubboctl/cmd/common.go
deleted file mode 100644
index 5fa60c67..00000000
--- a/dubboctl/cmd/common.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package cmd
-
-import (
-       "sigs.k8s.io/controller-runtime/pkg/client"
-)
-
-var (
-       // TestInstallFlag and TestCli are uses for black box testing
-       TestInstallFlag bool
-       TestCli         client.Client
-)
diff --git a/dubboctl/cmd/manifest.go b/dubboctl/cmd/manifest.go
deleted file mode 100644
index 8141e854..00000000
--- a/dubboctl/cmd/manifest.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package cmd
-
-//func AddManifest(rootCmd *cobra.Command) {
-//     manifestCmd := &cobra.Command{
-//             Use:   "manifest",
-//             Short: "Commands related to manifest",
-//             Long:  "Commands help user to generate manifest and install 
manifest",
-//     }
-//     manifest.ConfigManifestGenerateCmd(manifestCmd)
-//     manifest.ConfigManifestInstallCmd(manifestCmd)
-//     manifest.ConfigManifestUninstallCmd(manifestCmd)
-//     manifest.ConfigManifestDiffCmd(manifestCmd)
-//     rootCmd.AddCommand(manifestCmd)
-//}
diff --git a/dubboctl/cmd/manifest_test.go b/dubboctl/cmd/manifest_test.go
deleted file mode 100644
index 29fe869f..00000000
--- a/dubboctl/cmd/manifest_test.go
+++ /dev/null
@@ -1,191 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package cmd
-
-import (
-       "bytes"
-       "os"
-       "sigs.k8s.io/controller-runtime/pkg/client/fake"
-       "strings"
-       "testing"
-)
-
-//var (
-//     // TestInstallFlag and TestCli are uses for black box testing
-//     TestInstallFlag bool
-//     TestCli         client.Client
-//)
-
-func TestManifestGenerate(t *testing.T) {
-       tests := []struct {
-               desc    string
-               cmd     string
-               temp    string
-               wantErr bool
-       }{
-               {
-                       desc: "using default configuration without any flag",
-                       cmd:  "manifest generate",
-               },
-               {
-                       desc: "setting specification of built-in bootstrap",
-                       cmd:  "manifest generate --set 
spec.components.nacos.replicas=3",
-               },
-               {
-                       desc: "setting specification of add-on bootstrap",
-                       cmd:  "manifest generate --set 
spec.components.grafana.replicas=3",
-               },
-               {
-                       desc: "disabling bootstrap",
-                       cmd:  "manifest generate --set 
spec.componentsMeta.nacos.enabled=false",
-               },
-               {
-                       desc: "setting repository url and version of remote 
chart",
-                       cmd: "manifest generate --set 
spec.componentsMeta.grafana.repoURL=https://grafana.github.io/helm-charts"; +
-                               " --set 
spec.componentsMeta.grafana.version=6.31.0",
-               },
-               {
-                       desc: "setting specification of built-in bootstrap with 
wrong path",
-                       cmd:  "manifest generate --set 
components.nacos.replicas=3",
-               },
-               {
-                       desc: "setting specification of built-in bootstrap with 
wrong path",
-                       cmd:  "manifest generate --set 
components.grafana.replicas=3",
-               },
-               {
-                       desc: "generate manifest to target path",
-                       cmd:  "manifest generate -o ./testdata/temp",
-                       temp: "./testdata/temp",
-               },
-               {
-                       desc: "input user specified yaml",
-                       cmd:  "manifest generate -f 
./testdata/customization/user.yaml",
-               },
-       }
-       for _, test := range tests {
-               t.Run(test.desc, func(t *testing.T) {
-                       testManifestExecute(t, test.cmd, test.wantErr)
-                       // remove temporary dir
-                       if test.temp != "" {
-                               os.RemoveAll(test.temp)
-                       }
-               })
-       }
-}
-
-func TestManifestInstall(t *testing.T) {
-       tests := []struct {
-               desc    string
-               cmd     string
-               wantErr bool
-       }{
-               //{
-               //      desc: "without any flag",
-               //      cmd:  "manifest install",
-               //},
-       }
-       // For now, we do not use envTest to do black box testing
-       TestInstallFlag = true
-       TestCli = fake.NewClientBuilder().Build()
-
-       for _, test := range tests {
-               t.Run(test.desc, func(t *testing.T) {
-                       testManifestExecute(t, test.cmd, test.wantErr)
-               })
-       }
-}
-
-func TestManifestUninstall(t *testing.T) {
-       tests := []struct {
-               desc string
-               // cmd has been executed before
-               before  string
-               cmd     string
-               wantErr bool
-       }{
-               //{
-               //      desc:   "without any flag",
-               //      before: "manifest install",
-               //      cmd:    "manifest uninstall",
-               //},
-       }
-       // For now, we do not use envTest to do black box testing
-       TestInstallFlag = true
-       TestCli = fake.NewClientBuilder().Build()
-
-       for _, test := range tests {
-               t.Run(test.desc, func(t *testing.T) {
-                       // prepare existing resources
-                       testManifestExecute(t, test.before, false)
-                       testManifestExecute(t, test.cmd, test.wantErr)
-               })
-       }
-}
-
-func TestManifestDiff(t *testing.T) {
-       tests := []struct {
-               desc    string
-               befores []string
-               cmd     string
-               temps   []string
-               wantErr bool
-       }{
-               {
-                       desc: "compare two dirs",
-                       befores: []string{
-                               "manifest generate -f 
./testdata/diff/profileA.yaml -o ./testdata/tempA",
-                               "manifest generate -f 
./testdata/diff/profileB.yaml -o ./testdata/tempB",
-                       },
-                       cmd: "manifest diff ./testdata/tempA ./testdata/tempB 
--compareDir=true",
-                       temps: []string{
-                               "./testdata/tempA",
-                               "./testdata/tempB",
-                       },
-               },
-       }
-       for _, test := range tests {
-               t.Run(test.desc, func(t *testing.T) {
-                       for _, before := range test.befores {
-                               testManifestExecute(t, before, false)
-                       }
-                       testManifestExecute(t, test.cmd, test.wantErr)
-                       for _, temp := range test.temps {
-                               if temp != "" {
-                                       os.RemoveAll(temp)
-                               }
-                       }
-               })
-       }
-}
-
-func testManifestExecute(t *testing.T, cmds string, wantErr bool) string {
-       var out bytes.Buffer
-       args := strings.Split(cmds, " ")
-       rootCmd := GetRootCmd(args)
-       rootCmd.SetOut(&out)
-       if err := rootCmd.Execute(); err != nil {
-               if wantErr {
-                       return ""
-               }
-               t.Errorf("execute %s failed, err: %s", cmds, err)
-               return ""
-       }
-       if wantErr {
-               t.Errorf("want err but got no err")
-               return ""
-       }
-       return out.String()
-}
diff --git a/dubboctl/cmd/profile.go b/dubboctl/cmd/profile.go
deleted file mode 100644
index b5c0161a..00000000
--- a/dubboctl/cmd/profile.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package cmd
-
-//func addProfile(rootCmd *cobra.Command) {
-//     profileCmd := &cobra.Command{
-//             Use:   "profile",
-//             Short: "Commands related to profiles",
-//             Long:  "Commands help user to list and describe profiles",
-//     }
-//     profile.ConfigProfileListCmd(profileCmd)
-//     profile.ConfigProfileDiffCmd(profileCmd)
-//
-//     rootCmd.AddCommand(profileCmd)
-//}
diff --git a/dubboctl/cmd/profile_test.go b/dubboctl/cmd/profile_test.go
deleted file mode 100644
index 00057d10..00000000
--- a/dubboctl/cmd/profile_test.go
+++ /dev/null
@@ -1,151 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package cmd
-
-import (
-       "bytes"
-       "strings"
-       "testing"
-)
-
-func TestProfileList(t *testing.T) {
-       tests := []struct {
-               desc    string
-               cmd     string
-               want    string
-               wantErr bool
-       }{
-               {
-                       desc: "list all profiles provided by dubbo-admin",
-                       cmd:  "profile list",
-                       want: `Dubbo-admin profiles:
-    default
-    demo
-`,
-               },
-               {
-                       desc: "list all profiles in path specified by user",
-                       cmd:  "profile list --profiles ./testdata/profile",
-                       want: `Dubbo-admin profiles:
-    test0
-    test1
-    test2_wrong_format
-`,
-               },
-               {
-                       desc:    "display selected profile with wrong format",
-                       cmd:     "profile list test2_wrong_format --profiles 
./testdata/profile",
-                       wantErr: true,
-               },
-               {
-                       desc:    "display selected profiles",
-                       cmd:     "profile list test0 test1 --profiles 
./testdata/profile",
-                       wantErr: true,
-               },
-               {
-                       desc: "display profile that does not exist",
-                       cmd:  "profile list test2 --profiles 
./testdata/profile",
-                       want: "",
-               },
-               {
-                       desc:    "list profile directory that does not exist",
-                       cmd:     "profile list --profiles 
./testdata/profile/non_exist",
-                       wantErr: true,
-               },
-       }
-
-       for _, test := range tests {
-               t.Run(test.desc, func(t *testing.T) {
-                       res := testProfileExecute(t, test.cmd, test.wantErr)
-                       if test.want != "" && test.want != res {
-                               t.Errorf("want:\n%s\nbutgot:\n%s\n", test.want, 
res)
-                               return
-                       }
-               })
-       }
-}
-
-func TestProfileDiff(t *testing.T) {
-       tests := []struct {
-               desc    string
-               cmd     string
-               want    string
-               wantErr bool
-       }{
-               {
-                       desc: "show the difference between two profiles 
provided by dubbo-admin",
-                       cmd:  "profile diff default default",
-                       want: `two profiles are identical
-`,
-               },
-               {
-                       desc: "show the difference between two profiled 
specified by user",
-                       cmd:  "profile diff test0 test1 --profiles 
./testdata/profile",
-                       want: ` apiVersion: dubbo.apache.org/v1alpha1
- kind: DubboConfig
- metadata:
-   namespace: dubbo-system
- spec:
-   componentsMeta:
-     admin:
-       enabled: true
--    nacos:
--      enabled: true
-   namespace: dubbo-system
-   profile: default
- `,
-               },
-               {
-                       desc:    "do not specify two profiles",
-                       cmd:     "profile diff test0 --profiles 
./testdata/profile",
-                       wantErr: true,
-               },
-               {
-                       desc:    "diff profiles with wrong format",
-                       cmd:     "profile diff test0 test2_wrong_format 
--profiles ./testdata/profile",
-                       wantErr: true,
-               },
-       }
-
-       for _, test := range tests {
-               t.Run(test.desc, func(t *testing.T) {
-                       res := testProfileExecute(t, test.cmd, test.wantErr)
-                       if test.want != "" && test.want != res {
-                               t.Errorf("want:\n%s\nbutgot:\n%s\n", test.want, 
res)
-                               return
-                       }
-               })
-       }
-}
-
-func testProfileExecute(t *testing.T, cmds string, wantErr bool) string {
-       var out bytes.Buffer
-       args := strings.Split(cmds, " ")
-       rootCmd := GetRootCmd(args)
-       rootCmd.SetOut(&out)
-       if err := rootCmd.Execute(); err != nil {
-               if wantErr {
-                       return ""
-               }
-               t.Errorf("execute %s failed, err: %s", cmds, err)
-               return ""
-       }
-       if wantErr {
-               t.Errorf("want err but got no err")
-               return ""
-       }
-       return out.String()
-}
diff --git a/dubboctl/cmd/testdata/customization/user.yaml 
b/dubboctl/cmd/testdata/customization/user.yaml
deleted file mode 100644
index 47a04f64..00000000
--- a/dubboctl/cmd/testdata/customization/user.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: dubbo.apache.org/v1alpha1
-kind: DubboConfig
-metadata:
-  namespace: dubbo-system
-spec:
-  components:
-    nacos:
-      replicas: 3
\ No newline at end of file
diff --git a/dubboctl/cmd/testdata/diff/profileA.yaml 
b/dubboctl/cmd/testdata/diff/profileA.yaml
deleted file mode 100644
index 6d8f29ec..00000000
--- a/dubboctl/cmd/testdata/diff/profileA.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: dubbo.apache.org/v1alpha1
-kind: DubboConfig
-metadata:
-  namespace: dubbo-system
-spec:
-  profile: default
-  namespace: dubbo-system
-  components:
-    nacos:
-      replicas: 3
\ No newline at end of file
diff --git a/dubboctl/cmd/testdata/diff/profileB.yaml 
b/dubboctl/cmd/testdata/diff/profileB.yaml
deleted file mode 100644
index 3bb8969c..00000000
--- a/dubboctl/cmd/testdata/diff/profileB.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: dubbo.apache.org/v1alpha1
-kind: DubboConfig
-metadata:
-  namespace: dubbo-system
-spec:
-  profile: default
-  namespace: dubbo-system
-  componentsMeta:
-    zookeeper:
-      enabled: false
\ No newline at end of file
diff --git a/dubboctl/cmd/testdata/profile/test0.yaml 
b/dubboctl/cmd/testdata/profile/test0.yaml
deleted file mode 100644
index eb370562..00000000
--- a/dubboctl/cmd/testdata/profile/test0.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: dubbo.apache.org/v1alpha1
-kind: DubboConfig
-metadata:
-  namespace: dubbo-system
-spec:
-  profile: default
-  namespace: dubbo-system
-  componentsMeta:
-    admin:
-      enabled: true
-    nacos:
-      enabled: true
\ No newline at end of file
diff --git a/dubboctl/cmd/testdata/profile/test1.yaml 
b/dubboctl/cmd/testdata/profile/test1.yaml
deleted file mode 100644
index 5da9c59f..00000000
--- a/dubboctl/cmd/testdata/profile/test1.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: dubbo.apache.org/v1alpha1
-kind: DubboConfig
-metadata:
-  namespace: dubbo-system
-spec:
-  profile: default
-  namespace: dubbo-system
-  componentsMeta:
-    admin:
-      enabled: true
\ No newline at end of file
diff --git a/dubboctl/cmd/testdata/profile/test2_wrong_format.yaml 
b/dubboctl/cmd/testdata/profile/test2_wrong_format.yaml
deleted file mode 100644
index 3bc32919..00000000
--- a/dubboctl/cmd/testdata/profile/test2_wrong_format.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: dubbo.apache.org/v1alpha1
-kind: DubboConfig
-metadata:
-  namespace: dubbo-system
-spec:
-  profile: default
-  namespace: dubbo-system
-  componentsMeta:
-    admin:
-      enabled: right
\ No newline at end of file
diff --git a/dubboctl/cmd/testdata/repository.git/HEAD 
b/dubboctl/cmd/testdata/repository.git/HEAD
deleted file mode 100644
index b870d826..00000000
--- a/dubboctl/cmd/testdata/repository.git/HEAD
+++ /dev/null
@@ -1 +0,0 @@
-ref: refs/heads/main
diff --git a/dubboctl/cmd/testdata/repository.git/config 
b/dubboctl/cmd/testdata/repository.git/config
deleted file mode 100644
index e6da2315..00000000
--- a/dubboctl/cmd/testdata/repository.git/config
+++ /dev/null
@@ -1,6 +0,0 @@
-[core]
-       repositoryformatversion = 0
-       filemode = true
-       bare = true
-       ignorecase = true
-       precomposeunicode = true
diff --git a/dubboctl/cmd/testdata/repository.git/description 
b/dubboctl/cmd/testdata/repository.git/description
deleted file mode 100644
index 498b267a..00000000
--- a/dubboctl/cmd/testdata/repository.git/description
+++ /dev/null
@@ -1 +0,0 @@
-Unnamed repository; edit this file 'description' to name the repository.
diff --git a/dubboctl/cmd/testdata/repository.git/hooks/.gitinclude 
b/dubboctl/cmd/testdata/repository.git/hooks/.gitinclude
deleted file mode 100644
index e69de29b..00000000
diff --git a/dubboctl/cmd/testdata/repository.git/info/exclude 
b/dubboctl/cmd/testdata/repository.git/info/exclude
deleted file mode 100644
index a5196d1b..00000000
--- a/dubboctl/cmd/testdata/repository.git/info/exclude
+++ /dev/null
@@ -1,6 +0,0 @@
-# git ls-files --others --exclude-from=.git/info/exclude
-# Lines that start with '#' are comments.
-# For a project mostly in C, the following would be a good set of
-# exclude patterns (uncomment them if you want to use them):
-# *.[oa]
-# *~
diff --git a/dubboctl/cmd/testdata/repository.git/info/refs 
b/dubboctl/cmd/testdata/repository.git/info/refs
deleted file mode 100644
index 1c5b6a3c..00000000
--- a/dubboctl/cmd/testdata/repository.git/info/refs
+++ /dev/null
@@ -1 +0,0 @@
-6f6a77b977041c978dbdd431f9e7b2952c6908a3       refs/heads/main
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/00/9641334a89d30963a68442a132e5f8ef389ba8
 
b/dubboctl/cmd/testdata/repository.git/objects/00/9641334a89d30963a68442a132e5f8ef389ba8
deleted file mode 100644
index fb1c9330..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/00/9641334a89d30963a68442a132e5f8ef389ba8
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/25/128199189ce87956e5e41fa8113bbf5cb6c39a
 
b/dubboctl/cmd/testdata/repository.git/objects/25/128199189ce87956e5e41fa8113bbf5cb6c39a
deleted file mode 100644
index 32cf0f41..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/25/128199189ce87956e5e41fa8113bbf5cb6c39a
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/27/d75d0e58009a59e1ff8a52a3297e1e0574138b
 
b/dubboctl/cmd/testdata/repository.git/objects/27/d75d0e58009a59e1ff8a52a3297e1e0574138b
deleted file mode 100644
index 1d5f356e..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/27/d75d0e58009a59e1ff8a52a3297e1e0574138b
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/43/0739f6d9930f74a6aef1a410f0f0727d171cef
 
b/dubboctl/cmd/testdata/repository.git/objects/43/0739f6d9930f74a6aef1a410f0f0727d171cef
deleted file mode 100644
index 9668e89d..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/43/0739f6d9930f74a6aef1a410f0f0727d171cef
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/67/00ea8078422674e91189c1b513d1ab0696b150
 
b/dubboctl/cmd/testdata/repository.git/objects/67/00ea8078422674e91189c1b513d1ab0696b150
deleted file mode 100644
index 21eed2bc..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/67/00ea8078422674e91189c1b513d1ab0696b150
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/6f/6a77b977041c978dbdd431f9e7b2952c6908a3
 
b/dubboctl/cmd/testdata/repository.git/objects/6f/6a77b977041c978dbdd431f9e7b2952c6908a3
deleted file mode 100644
index 7c0a49fd..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/6f/6a77b977041c978dbdd431f9e7b2952c6908a3
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/8b/57110b1cc8f2019ca4b2ed51a450ee0873eaaf
 
b/dubboctl/cmd/testdata/repository.git/objects/8b/57110b1cc8f2019ca4b2ed51a450ee0873eaaf
deleted file mode 100644
index 5a22b699..00000000
--- 
a/dubboctl/cmd/testdata/repository.git/objects/8b/57110b1cc8f2019ca4b2ed51a450ee0873eaaf
+++ /dev/null
@@ -1,4 +0,0 @@
-xeR�n�0�Y_A�9ž&�}
-��^%۴MD��$g�/)m�.j�"r8������ӧ3��%$�!nJ}�m��"�\���dL���gx]#�R�B   
�7�40� y�3�'b>�g���� ���   G�7k� ��
O���N���d)o�r���9���c"L-��������K�Ew��+R�:�.̀rB;�"����A�J��?X
�#�L�+��6\��ʚ2^nS�jAI�'�Q>)���`���l��ڱs
�Y��+�lˆ�Ym�>?,Jk�$\,��i�B�ynoؗ�+�"�*���u�#�cp�/i&�G&�G�9SĖ�d������۔��f<r��!8�}���%t�mm�U�N
-/u    )˭}���]�ZЬ�m���7�Ҧ�eG{uvl�:^j�Sk�P/��0dMϷ|ly[ө���Ht0����0Ҵ�P���I=�
-
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/98/68959b2b456ac7767bf351a84b369f9fbadb3a
 
b/dubboctl/cmd/testdata/repository.git/objects/98/68959b2b456ac7767bf351a84b369f9fbadb3a
deleted file mode 100644
index 2d5c6827..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/98/68959b2b456ac7767bf351a84b369f9fbadb3a
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/9a/c29c7ad8c06fa6613b794521568fbd7ea007dd
 
b/dubboctl/cmd/testdata/repository.git/objects/9a/c29c7ad8c06fa6613b794521568fbd7ea007dd
deleted file mode 100644
index 810a26d1..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/9a/c29c7ad8c06fa6613b794521568fbd7ea007dd
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/b2/7e306a552e80fcae0bfa959bd6e8652de70c69
 
b/dubboctl/cmd/testdata/repository.git/objects/b2/7e306a552e80fcae0bfa959bd6e8652de70c69
deleted file mode 100644
index 1de2027e..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/b2/7e306a552e80fcae0bfa959bd6e8652de70c69
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/b7/5832d0a4a4bb0409cca573b2c97b017d088f90
 
b/dubboctl/cmd/testdata/repository.git/objects/b7/5832d0a4a4bb0409cca573b2c97b017d088f90
deleted file mode 100644
index 5476d95f..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/b7/5832d0a4a4bb0409cca573b2c97b017d088f90
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/c7/e84596af04680b8e7a39b9a527f19ccd75f287
 
b/dubboctl/cmd/testdata/repository.git/objects/c7/e84596af04680b8e7a39b9a527f19ccd75f287
deleted file mode 100644
index ea89e62c..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/c7/e84596af04680b8e7a39b9a527f19ccd75f287
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/ca/1a6296f97eced6c9497d05598ef508852cac5d
 
b/dubboctl/cmd/testdata/repository.git/objects/ca/1a6296f97eced6c9497d05598ef508852cac5d
deleted file mode 100644
index fead6c55..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/ca/1a6296f97eced6c9497d05598ef508852cac5d
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/ca/5019f945b1d769d042c5f87d39f5d7a15f290c
 
b/dubboctl/cmd/testdata/repository.git/objects/ca/5019f945b1d769d042c5f87d39f5d7a15f290c
deleted file mode 100644
index c7581055..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/ca/5019f945b1d769d042c5f87d39f5d7a15f290c
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
 
b/dubboctl/cmd/testdata/repository.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
deleted file mode 100644
index 71122389..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
 and /dev/null differ
diff --git 
a/dubboctl/cmd/testdata/repository.git/objects/f3/a9c97a29b561e7d72668581ea82284de2f1ca0
 
b/dubboctl/cmd/testdata/repository.git/objects/f3/a9c97a29b561e7d72668581ea82284de2f1ca0
deleted file mode 100644
index 21ba1fb5..00000000
Binary files 
a/dubboctl/cmd/testdata/repository.git/objects/f3/a9c97a29b561e7d72668581ea82284de2f1ca0
 and /dev/null differ
diff --git a/dubboctl/cmd/testdata/repository.git/objects/info/packs 
b/dubboctl/cmd/testdata/repository.git/objects/info/packs
deleted file mode 100644
index 8b137891..00000000
--- a/dubboctl/cmd/testdata/repository.git/objects/info/packs
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/dubboctl/cmd/testdata/repository.git/packed-refs 
b/dubboctl/cmd/testdata/repository.git/packed-refs
deleted file mode 100644
index d2dcd2ba..00000000
--- a/dubboctl/cmd/testdata/repository.git/packed-refs
+++ /dev/null
@@ -1,2 +0,0 @@
-# pack-refs with: peeled fully-peeled sorted
-9868959b2b456ac7767bf351a84b369f9fbadb3a refs/heads/main
diff --git a/dubboctl/cmd/testdata/repository.git/refs/heads/main 
b/dubboctl/cmd/testdata/repository.git/refs/heads/main
deleted file mode 100644
index e37508f2..00000000
--- a/dubboctl/cmd/testdata/repository.git/refs/heads/main
+++ /dev/null
@@ -1 +0,0 @@
-6f6a77b977041c978dbdd431f9e7b2952c6908a3
diff --git a/dubboctl/cmd/testdata/repository.git/refs/tags/.gitinclude 
b/dubboctl/cmd/testdata/repository.git/refs/tags/.gitinclude
deleted file mode 100644
index e69de29b..00000000
diff --git a/operator/pkg/uninstall/uninstaller.go 
b/operator/pkg/uninstall/uninstaller.go
index 82f37fde..e6cba296 100644
--- a/operator/pkg/uninstall/uninstaller.go
+++ b/operator/pkg/uninstall/uninstaller.go
@@ -96,10 +96,10 @@ func DeleteObjectsList(c kube.CLIClient, dryRun bool, log 
clog.Logger, objectsLi
        return errs.ToErrors()
 }
 
-func DeleteResource(kc kube.CLIClient, dryRun bool, _ clog.Logger, obj 
*unstructured.Unstructured) error {
+func DeleteResource(kc kube.CLIClient, dryRun bool, cl clog.Logger, obj 
*unstructured.Unstructured) error {
        name := fmt.Sprintf("%v/%s.%s", obj.GroupVersionKind(), obj.GetName(), 
obj.GetNamespace())
        if dryRun {
-               fmt.Printf("Not pruning object %s because of dry run.", name)
+               cl.LogAndPrintf("Not pruning object %s because of dry run.", 
name)
                return nil
        }
 
@@ -112,12 +112,12 @@ func DeleteResource(kc kube.CLIClient, dryRun bool, _ 
clog.Logger, obj *unstruct
                if !kerrors.IsNotFound(err) {
                        return err
                }
-               fmt.Printf("object: %s is not being deleted because it no 
longer exists", name)
+               cl.LogAndPrintf("object: %s is not being deleted because it no 
longer exists", name)
 
                return nil
        }
 
-       fmt.Printf("✔︎ Removed %s.\n", name)
+       cl.LogAndPrintf("✔︎ Removed %s.\n", name)
 
        return nil
 }
diff --git a/operator/pkg/util/clog/log/option.go 
b/operator/pkg/util/clog/log/option.go
index 52c76635..e78867d8 100644
--- a/operator/pkg/util/clog/log/option.go
+++ b/operator/pkg/util/clog/log/option.go
@@ -18,3 +18,5 @@ const (
        InfoLevel
        DebugLevel
 )
+
+type Options struct{}


Reply via email to