Skip to content

Commit

Permalink
feat(update): release 2.9.0
Browse files Browse the repository at this point in the history
release 2.9.0

Signed-off-by: ysicing <i@ysicing.me>
  • Loading branch information
ysicing committed Jan 29, 2022
1 parent a4374fa commit e3332d6
Show file tree
Hide file tree
Showing 64 changed files with 263 additions and 179 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- v2.9.0
- `k3s getbin` 新增下载k3s二进制
- k3s默认添加`--rootless`参数
- k3s不使用docker runtime添加`--rootless`参数
- 调整合并部分子命令

- v2.8.0
Expand Down
2 changes: 1 addition & 1 deletion cmd/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
func newCloudCommand(f factory.Factory) *cobra.Command {
cloud := &cobra.Command{
Use: "cloud [flags]",
Short: "云服务商支持",
Short: "cloud tools",
}
cloud.AddCommand(newCvmCmd(f))
cloud.AddCommand(newCloudDomain(f))
Expand Down
16 changes: 16 additions & 0 deletions cmd/exp.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,25 @@ import (
"github.com/ysicing/ergo/common"
"github.com/ysicing/ergo/pkg/config"
"github.com/ysicing/ergo/pkg/ergo/experimental"
"github.com/ysicing/ergo/pkg/ergo/experimental/codegen"
"github.com/ysicing/ergo/pkg/util/factory"
"helm.sh/helm/v3/pkg/cli/output"
)

func newCodeGenCmd(f factory.Factory) *cobra.Command {
c := &codegen.CodeOptions{
Log: f.GetLog(),
}
cmd := &cobra.Command{
Use: "code [flags]",
Short: "初始化项目",
Run: func(cobraCmd *cobra.Command, args []string) {
c.Init()
},
}
return cmd
}

func newConfigCmd() *cobra.Command {
var configCommand = &cobra.Command{
Use: "config",
Expand Down Expand Up @@ -107,5 +122,6 @@ func newExperimentalCmd(f factory.Factory) *cobra.Command {
cmd.AddCommand(install)
cmd.AddCommand(simplefile)
cmd.AddCommand(newConfigCmd())
cmd.AddCommand(newCodeGenCmd(f))
return cmd
}
2 changes: 1 addition & 1 deletion cmd/ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type ExtOptions struct {
func newExtCmd(f factory.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "ext [flags]",
Short: "ext 功能",
Short: "ext tools",
Version: "2.1.0",
}
cmd.AddCommand(ghClean(f))
Expand Down
4 changes: 2 additions & 2 deletions cmd/k3s.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ func initAction(cmd *cobra.Command, args []string) error {
k3sargs := []string{
"server",
"--disable=servicelb,traefik",
"--rootless",
"--disable-helm-controller",
"--kube-proxy-arg=proxy-mode=ipvs",
"--kube-proxy-arg=masquerade-all=true",
Expand Down Expand Up @@ -208,7 +207,6 @@ func joinAction(cmd *cobra.Command, args []string) error {
}
k3sargs := []string{
"agent",
"--rootless",
"--kube-proxy-arg=proxy-mode=ipvs",
"--kube-proxy-arg=masquerade-all=true",
"--kube-proxy-arg=metrics-bind-address=0.0.0.0",
Expand Down Expand Up @@ -275,6 +273,8 @@ func configArgs(args []string, san string, docker, nonecni bool) []string {
if checkBin("docker") {
args = append(args, "--docker")
}
} else {
args = append(args, "--rootless")
}
if nonecni {
args = append(args, "--flannel-backend=none")
Expand Down
2 changes: 1 addition & 1 deletion cmd/ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func newOPSCmd(f factory.Factory) *cobra.Command {
}
ops := &cobra.Command{
Use: "ops [flags]",
Short: "基础运维",
Short: "sre tools",
Version: "2.0.0",
Args: cobra.NoArgs,
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// MIT License
// AGPL License
// Copyright (c) 2020 ysicing <i@ysicing.me>

package cmd
Expand Down Expand Up @@ -59,7 +59,6 @@ func BuildRoot(f factory.Factory) *cobra.Command {
rootCmd.AddCommand(newUpgradeCmd())
rootCmd.AddCommand(newDebianCmd(f))
rootCmd.AddCommand(newOPSCmd(f))
rootCmd.AddCommand(newCodeGenCmd(f))
rootCmd.AddCommand(newCloudCommand(f))
rootCmd.AddCommand(newRepoCmd(f))
rootCmd.AddCommand(newPluginCmd(f))
Expand Down
1 change: 1 addition & 0 deletions common/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ import (
_ "embed"
)

// DefaultTemplate default lima template
//go:embed debian.yml
var DefaultTemplate []byte
9 changes: 4 additions & 5 deletions docs/ergo.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ A simple command line client for devops

### SEE ALSO

* [ergo cloud](ergo_cloud.md) - 云服务商支持
* [ergo code](ergo_code.md) - 初始化项目
* [ergo cloud](ergo_cloud.md) - cloud tools
* [ergo debian](ergo_debian.md) - 初始化debian, 升级debian内核
* [ergo experimental](ergo_experimental.md) - Experimental commands that may be modified or deprecated
* [ergo ext](ergo_ext.md) - ext 功能
* [ergo ext](ergo_ext.md) - ext tools
* [ergo kube](ergo_kube.md) - kube ops tools
* [ergo ops](ergo_ops.md) - 基础运维
* [ergo ops](ergo_ops.md) - sre tools
* [ergo plugin](ergo_plugin.md) - Provides utilities for interacting with plugins
* [ergo repo](ergo_repo.md) - 管理plugins & services repos
* [ergo service](ergo_service.md) - Provides utilities for interacting with services
* [ergo upgrade](ergo_upgrade.md) - upgrade ergo to the newest version
* [ergo version](ergo_version.md) - show ergo version

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_cloud.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## ergo cloud

云服务商支持
cloud tools

### Options

Expand All @@ -23,4 +23,4 @@
* [ergo cloud cvm](ergo_cloud_cvm.md) - 开通竞价机器
* [ergo cloud domain](ergo_cloud_domain.md) - domain 域名服务

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_cloud_cr.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cr 容器镜像服务

### SEE ALSO

* [ergo cloud](ergo_cloud.md) - 云服务商支持
* [ergo cloud](ergo_cloud.md) - cloud tools
* [ergo cloud cr list](ergo_cloud_cr_list.md) - 镜像列表

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_cloud_cr_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ergo cloud cr list [flags]

* [ergo cloud cr](ergo_cloud_cr.md) - cr 容器镜像服务

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_cloud_cvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ ergo cloud cvm [flags]

### SEE ALSO

* [ergo cloud](ergo_cloud.md) - 云服务商支持
* [ergo cloud](ergo_cloud.md) - cloud tools

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_cloud_domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ domain 域名服务

### SEE ALSO

* [ergo cloud](ergo_cloud.md) - 云服务商支持
* [ergo cloud](ergo_cloud.md) - cloud tools
* [ergo cloud domain list](ergo_cloud_domain_list.md) - 域名列表

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_cloud_domain_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ergo cloud domain list [flags]

* [ergo cloud domain](ergo_cloud_domain.md) - domain 域名服务

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
* [ergo debian init](ergo_debian_init.md) - 初始化debian或debian系环境
* [ergo debian upcore](ergo_debian_upcore.md) - 升级Debian内核

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_debian_apt.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ ergo debian apt [flags]

* [ergo debian](ergo_debian.md) - 初始化debian, 升级debian内核

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_debian_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ ergo debian init [flags]

* [ergo debian](ergo_debian.md) - 初始化debian, 升级debian内核

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_debian_upcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ ergo debian upcore [flags]

* [ergo debian](ergo_debian.md) - 初始化debian, 升级debian内核

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
3 changes: 2 additions & 1 deletion docs/ergo_experimental.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ Experimental commands that may be modified or deprecated
### SEE ALSO

* [ergo](ergo.md) - ergo, ergo, NB!
* [ergo experimental code](ergo_experimental_code.md) - 初始化项目
* [ergo experimental config](ergo_experimental_config.md) - ergo config
* [ergo experimental install](ergo_experimental_install.md) - install ergo
* [ergo experimental simplefile](ergo_experimental_simplefile.md) - simple file server

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
27 changes: 27 additions & 0 deletions docs/ergo_experimental_code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## ergo experimental code

初始化项目

```
ergo experimental code [flags]
```

### Options

```
-h, --help help for code
```

### Options inherited from parent commands

```
--config string The ergo config file to use (default "/Users/ysicing/.ergo/.config/ergo.yml")
--debug Prints the stack trace if an error occurs
--silent Run in silent mode and prevents any ergo log output except panics & fatals
```

### SEE ALSO

* [ergo experimental](ergo_experimental.md) - Experimental commands that may be modified or deprecated

###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_experimental_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ ergo config
* [ergo experimental config show](ergo_experimental_config_show.md) - Show YAML files
* [ergo experimental config validate](ergo_experimental_config_validate.md) - Validate YAML files

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_experimental_config_show.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ergo experimental config show FILE.yaml [flags]

* [ergo experimental config](ergo_experimental_config.md) - ergo config

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_experimental_config_validate.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ergo experimental config validate FILE.yaml [FILE.yaml, ...] [flags]

* [ergo experimental config](ergo_experimental_config.md) - ergo config

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_experimental_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ergo experimental install [flags]

* [ergo experimental](ergo_experimental.md) - Experimental commands that may be modified or deprecated

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_experimental_simplefile.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ ergo experimental simplefile [flags]

* [ergo experimental](ergo_experimental.md) - Experimental commands that may be modified or deprecated

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_ext.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## ergo ext

ext 功能
ext tools

### Options

Expand All @@ -23,4 +23,4 @@ ext 功能
* [ergo ext lima](ergo_ext_lima.md) - Linux virtual machines on macOS
* [ergo ext sync](ergo_ext_sync.md) - 同步多个镜像 ergo ext sync gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_ext_gh.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ ergo ext gh [flags]

### SEE ALSO

* [ergo ext](ergo_ext.md) - ext 功能
* [ergo ext](ergo_ext.md) - ext tools

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_ext_lima.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ ergo ext lima [flags]

### SEE ALSO

* [ergo ext](ergo_ext.md) - ext 功能
* [ergo ext](ergo_ext.md) - ext tools

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_ext_sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ ergo ext sync [flags]

### SEE ALSO

* [ergo ext](ergo_ext.md) - ext 功能
* [ergo ext](ergo_ext.md) - ext tools

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_kube.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ kube manage tools. eg: k3s install, k8s manage restart
* [ergo](ergo.md) - ergo, ergo, NB!
* [ergo kube k3s](ergo_kube_k3s.md) - k3s

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_kube_k3s.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ k3s
* [ergo kube k3s init](ergo_kube_k3s_init.md) - init k3s control-plane(master) node
* [ergo kube k3s join](ergo_kube_k3s_join.md) - join k3s cluster

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_kube_k3s_bin.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ ergo kube k3s bin [flags]

* [ergo kube k3s](ergo_kube_k3s.md) - k3s

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_kube_k3s_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ ergo kube k3s init [flags]

* [ergo kube k3s](ergo_kube_k3s.md) - k3s

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
2 changes: 1 addition & 1 deletion docs/ergo_kube_k3s_join.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ ergo kube k3s join [flags]

* [ergo kube k3s](ergo_kube_k3s.md) - k3s

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_ops.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## ergo ops

基础运维
sre tools

### Options

Expand All @@ -25,4 +25,4 @@
* [ergo ops ps](ergo_ops_ps.md) - Show process information like "ps -ef" command
* [ergo ops wget](ergo_ops_wget.md) - wget

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_ops_exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ ergo ops exec [flags]

### SEE ALSO

* [ergo ops](ergo_ops.md) - 基础运维
* [ergo ops](ergo_ops.md) - sre tools

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_ops_nc.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ ergo ops nc [flags]

### SEE ALSO

* [ergo ops](ergo_ops.md) - 基础运维
* [ergo ops](ergo_ops.md) - sre tools

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
4 changes: 2 additions & 2 deletions docs/ergo_ops_ping.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ ergo ops ping [flags]

### SEE ALSO

* [ergo ops](ergo_ops.md) - 基础运维
* [ergo ops](ergo_ops.md) - sre tools

###### Auto generated by spf13/cobra on 23-Jan-2022
###### Auto generated by spf13/cobra on 29-Jan-2022
Loading

0 comments on commit e3332d6

Please sign in to comment.