mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
feat(climc): k8s cluster extra config (#15390)
This commit is contained in:
@@ -52,6 +52,8 @@ func initKubeCluster() {
|
||||
cmd.Perform("delete-machines", new(o.KubeClusterDeleteMachinesOptions))
|
||||
cmd.Perform("add-machines", new(o.KubeClusterAddMachinesOptions))
|
||||
cmd.PerformClass("gc", new(o.ClusterGCOpts))
|
||||
cmd.Perform("set-extra-config", new(o.ClusterSetExtraConfigOpt))
|
||||
cmd.Get("extra-config", new(o.IdentOptions))
|
||||
|
||||
R(&o.KubeClusterImportOptions{}, cmdN("import"), "Import k8s cluster", func(s *mcclient.ClientSession, args *o.KubeClusterImportOptions) error {
|
||||
params, err := args.Params()
|
||||
|
||||
@@ -791,3 +791,13 @@ func (o ClusterGetAddonsOpt) Params() (jsonutils.JSONObject, error) {
|
||||
|
||||
return params, nil
|
||||
}
|
||||
|
||||
type ClusterSetExtraConfigOpt struct {
|
||||
IdentOptions
|
||||
DockerRegistryMirrors []string `json:"docker_registry_mirrors"`
|
||||
DockerInsecureRegistries []string `json:"docker_insecure_registries"`
|
||||
}
|
||||
|
||||
func (o ClusterSetExtraConfigOpt) Params() (jsonutils.JSONObject, error) {
|
||||
return jsonutils.Marshal(o), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user