Skip to content

Commit

Permalink
refactor(subcmd): del manage subcmd
Browse files Browse the repository at this point in the history
del manage subcmd

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed Mar 30, 2023
1 parent c5a4bfc commit 79baca5
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 69 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ steps:
pull: always
privileged: true
commands:
- wget -O /drone/src/hack/bin/k3s-linux-amd64 https://pkg-1308438674.cos.ap-shanghai.myqcloud.com/qucheng/cli/stable/k3s/v1.24.11/k3s-linux-amd64
- wget -O /drone/src/hack/bin/k3s-linux-arm64 https://pkg-1308438674.cos.ap-shanghai.myqcloud.com/qucheng/cli/stable/k3s/v1.24.11/k3s-linux-arm64
- wget -O /drone/src/hack/bin/k3s-linux-amd64 https://pkg-1308438674.cos.ap-shanghai.myqcloud.com/qucheng/cli/stable/k3s/v1.24.12/k3s-linux-amd64
- wget -O /drone/src/hack/bin/k3s-linux-arm64 https://pkg-1308438674.cos.ap-shanghai.myqcloud.com/qucheng/cli/stable/k3s/v1.24.12/k3s-linux-arm64
- chmod +x /drone/src/hack/bin/k3s-linux-amd64 /drone/src/hack/bin/k3s-linux-arm64

- name: build
Expand Down
2 changes: 1 addition & 1 deletion cmd/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
func newCmdApp(f factory.Factory) *cobra.Command {
appCmd := &cobra.Command{
Use: "app",
Short: "Manage applications",
Short: "Manage Quickon applications",
Hidden: false,
}
appCmd.AddCommand(app.NewCmdAppExec(f))
Expand Down
31 changes: 0 additions & 31 deletions cmd/manage.go

This file was deleted.

10 changes: 10 additions & 0 deletions cmd/quickon.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package cmd

import (
"github.com/easysoft/qcadmin/cmd/manage"
"github.com/easysoft/qcadmin/cmd/quickon"
"github.com/easysoft/qcadmin/internal/pkg/util/factory"
"github.com/spf13/cobra"
Expand All @@ -20,5 +21,14 @@ func newCmdQuickon(f factory.Factory) *cobra.Command {
quickonCmd.AddCommand(quickon.CheckCommand(f))
quickonCmd.AddCommand(quickon.InitCommand(f))
quickonCmd.AddCommand(quickon.UninstallCommand(f))
quickonCmd.AddCommand(manage.NewCmdPlugin(f))
quickonCmd.AddCommand(manage.NewResetPassword(f))
quickonCmd.AddCommand(manage.NewRenewTLS(f))
gdbCmd := &cobra.Command{
Use: "gdb",
Short: "Manage Global Database",
}
gdbCmd.AddCommand(manage.NewCmdGdbList(f))
quickonCmd.AddCommand(gdbCmd)
return quickonCmd
}
1 change: 0 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func BuildRoot(f factory.Factory) *cobra.Command {
rootCmd.AddCommand(newCmdUninstall(f))
rootCmd.AddCommand(newCmdStatus(f))
rootCmd.AddCommand(newCmdUpgrade(f))
rootCmd.AddCommand(newCmdManage(f))
rootCmd.AddCommand(newCmdApp(f))
rootCmd.AddCommand(newCmdCluster(f))
rootCmd.AddCommand(newCmdQuickon(f))
Expand Down
32 changes: 16 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,28 @@ require (
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gotest.tools v2.2.0+incompatible
helm.sh/helm/v3 v3.11.1
k8s.io/api v0.26.1
k8s.io/apimachinery v0.26.1
k8s.io/cli-runtime v0.26.0
k8s.io/client-go v0.26.1
k8s.io/component-base v0.26.1
k8s.io/kubectl v0.26.0
k8s.io/metrics v0.25.6
k8s.io/api v0.26.3
k8s.io/apimachinery v0.26.3
k8s.io/cli-runtime v0.26.3
k8s.io/client-go v0.26.3
k8s.io/component-base v0.26.3
k8s.io/kubectl v0.26.3
k8s.io/metrics v0.26.3
k8s.io/system-validators v1.7.0
k8s.io/utils v0.0.0-20230313181309-38a27ef9d749
sigs.k8s.io/yaml v1.3.0
)

// Replace to match K8s 1.25.6
// Replace to match K8s 1.25.8
replace (
github.com/kardianos/service v1.2.1-0.20211104163826-b9d1d5b7279b => github.com/BeidouCloudPlatform/service v1.2.1-0.20211108101837-1fc58f473016
k8s.io/api => k8s.io/api v0.25.6
k8s.io/apimachinery => k8s.io/apimachinery v0.25.6
k8s.io/cli-runtime => k8s.io/cli-runtime v0.25.6
k8s.io/client-go => k8s.io/client-go v0.25.6
k8s.io/component-base => k8s.io/component-base v0.25.6
k8s.io/kubectl => k8s.io/kubectl v0.25.6
k8s.io/metrics => k8s.io/metrics v0.25.6
k8s.io/api => k8s.io/api v0.25.8
k8s.io/apimachinery => k8s.io/apimachinery v0.25.8
k8s.io/cli-runtime => k8s.io/cli-runtime v0.25.8
k8s.io/client-go => k8s.io/client-go v0.25.8
k8s.io/component-base => k8s.io/component-base v0.25.8
k8s.io/kubectl => k8s.io/kubectl v0.25.8
k8s.io/metrics => k8s.io/metrics v0.25.8
)

require (
Expand Down Expand Up @@ -214,7 +214,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.26.1 // indirect
k8s.io/apiserver v0.26.1 // indirect
k8s.io/component-helpers v0.25.6 // indirect
k8s.io/component-helpers v0.25.8 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
oras.land/oras-go v1.2.2 // indirect
Expand Down
32 changes: 16 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1436,30 +1436,30 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.25.6 h1:LwDY2H6kD/3R8TekJYYaJWOdekNdXDO44eVpX6sNtJA=
k8s.io/api v0.25.6/go.mod h1:bVp01KUcl8VUHFBTJMOknWNo7XvR0cMbeTTuFg1zCUs=
k8s.io/api v0.25.8 h1:pcbnWkCcmjNhp6OEKqR+ojO0CJydpOOw7WiWedjLJAU=
k8s.io/api v0.25.8/go.mod h1:FaJqAtI13XOERtpLOQTkW3SiSf0lqsUohYqaxCyHI18=
k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI=
k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM=
k8s.io/apimachinery v0.25.6 h1:r6KIF2AHwLqFfZ0LcOA3I11SF62YZK83dxj1fn14NOQ=
k8s.io/apimachinery v0.25.6/go.mod h1:1S2i1QHkmxc8+EZCIxe/fX5hpldVXk4gvnJInMEb8D4=
k8s.io/apimachinery v0.25.8 h1:c4kI9xm0U5nid8sBpBvM+2VHlv4Af8KnbhZIodZF/54=
k8s.io/apimachinery v0.25.8/go.mod h1:ZTl0drTQaFi5gMM3snYI5tWV1XJmRH1gfnDx2QCLsxk=
k8s.io/apiserver v0.26.1 h1:6vmnAqCDO194SVCPU3MU8NcDgSqsUA62tBUSWrFXhsc=
k8s.io/apiserver v0.26.1/go.mod h1:wr75z634Cv+sifswE9HlAo5FQ7UoUauIICRlOE+5dCg=
k8s.io/cli-runtime v0.25.6 h1:PE9bUEQXbvzJuENS7myEb3o6N6rLi5vPacLYf/FRKXI=
k8s.io/cli-runtime v0.25.6/go.mod h1:mspX5g+K3RbhNs12mPqH+ZlPfclaJIRpQvdogKOH+6o=
k8s.io/client-go v0.25.6 h1:CHxACHi0DijmlYyUR7ooZoXnD5P8jYLgBHcxp775x/U=
k8s.io/client-go v0.25.6/go.mod h1:s9mMAGFYiH3Z66j7BESzu0GEradT9GQ2LjFf/YRrnyc=
k8s.io/component-base v0.25.6 h1:v3ci6FbXFcxpjyQJaaLq0MgzT3vyFzwUDWtO+KRv9Bk=
k8s.io/component-base v0.25.6/go.mod h1:k7DfcfJ8cOI6A2xTCfU5LxsnXV+lWw1ME8cRCHzIh6o=
k8s.io/component-helpers v0.25.6 h1:OHTT22as3x7DUeMD4SrsuLTjSU0ywfVALiz2pDOXaWo=
k8s.io/component-helpers v0.25.6/go.mod h1:TbxdooEyf6EgMtx/5WayyChEXY6uTgZs59T1FwLL/Nw=
k8s.io/cli-runtime v0.25.8 h1:3+I4zgdcY0KoCAWgqfQEMkhKOK35ailULxeTMcrBAfs=
k8s.io/cli-runtime v0.25.8/go.mod h1:Kbi+0tb9s/Gtsp3HfMJ/P20K3MYeC4t/CMDaV4pZiJQ=
k8s.io/client-go v0.25.8 h1:PruqsI6qccbowI5wjeNosyE1BiKViChRWVOvCZtYnXY=
k8s.io/client-go v0.25.8/go.mod h1:Wiu5CQCaOqWugLrdvl04HK90P0QMc4oxQ3BXoJGjD+A=
k8s.io/component-base v0.25.8 h1:lQ5Ouw7lupdpXn5slRjAeHnlMK/aAEbPf9jjSWbOD3c=
k8s.io/component-base v0.25.8/go.mod h1:MkC9Lz4fXoGOgB2WhFBU4zjiviIEeJS3sVhTxX9vt6s=
k8s.io/component-helpers v0.25.8 h1:jTi68SNaCis1s4//S7CXOtmzIOqhiY5CUroZuD2+OEg=
k8s.io/component-helpers v0.25.8/go.mod h1:+EZENL02v1dJXJvAYXZfAldATLviWL7Y/K3Pw8LB3MU=
k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw=
k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E=
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
k8s.io/kubectl v0.25.6 h1:uGoNw4vF+O62NTwRqM40gMCEI5ujw2g0ocT6dDPt55c=
k8s.io/kubectl v0.25.6/go.mod h1:sqtVRxDlZdaSusmLVysYo8S7h4mB/Fe8YWvt2KCle3k=
k8s.io/metrics v0.25.6 h1:EezfQTfTsSW/Cs9oHJXAftRlbL0fnHfDh02ObTOs/34=
k8s.io/metrics v0.25.6/go.mod h1:LGcsjMsQQvt/4vrvQzqOIHv9/sIVov1ZE7HtQxc8d9w=
k8s.io/kubectl v0.25.8 h1:i6nlpU5LQyg9J19mKihJo1oE7FE7+Zg1cF4TOpJQmEQ=
k8s.io/kubectl v0.25.8/go.mod h1:IPmVLfTvFIZKl0vwyl0LkegIbk2jsnaVmkpDgDymCPI=
k8s.io/metrics v0.25.8 h1:292TdTrDkQt6cfSWv6eC6teXrnlU5DO9q3Tg7r09v3A=
k8s.io/metrics v0.25.8/go.mod h1:aQiF9mWSy52033hGywZf90+5mn8ypbblquDuVuLVs8U=
k8s.io/system-validators v1.7.0 h1:tYD3hojdYc58CKtiEsh7BWW6Pg0x6xbclUiwjaIiiYo=
k8s.io/system-validators v1.7.0/go.mod h1:gP1Ky+R9wtrSiFbrpEPwWMeYz9yqyy1S/KOh0Vci7WI=
k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 h1:xMMXJlJbsU8w3V5N2FLDQ8YgU8s1EoULdbQBcAeNJkY=
Expand Down
4 changes: 2 additions & 2 deletions hack/scripts/getbin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
set -xe

if [ ! -f "hack/bin/k3s-linux-amd64" ]; then
wget -O hack/bin/k3s-linux-amd64 https://github.com/k3s-io/k3s/releases/download/v1.24.11%2Bk3s1/k3s
wget -O hack/bin/k3s-linux-amd64 https://github.com/k3s-io/k3s/releases/download/v1.24.12%2Bk3s1/k3s
fi
if [ ! -f "hack/bin/k3s-linux-arm64" ]; then
wget -O hack/bin/k3s-linux-arm64 https://github.com/k3s-io/k3s/releases/download/v1.24.11%2Bk3s1/k3s-arm64
wget -O hack/bin/k3s-linux-arm64 https://github.com/k3s-io/k3s/releases/download/v1.24.12%2Bk3s1/k3s-arm64
fi

chmod +x hack/bin/k3s-linux-amd64 hack/bin/k3s-linux-arm64

0 comments on commit 79baca5

Please sign in to comment.