🤬
  • feat(cluster): 集群创建增加 docker 参数

  • Loading...
  • ssongliu committed 2 years ago
    b0c017b9
    1 parent 506450bd
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    migration/127_spec_adjust.up.sql
    skipped 36 lines
    37 37   `id` varchar(255) NOT NULL,
    38 38   `cluster_id` varchar(255) NOT NULL,
    39 39   `runtime_type` varchar(255) DEFAULT NULL,
     40 + `docker_mirror_registry` varchar(255) DEFAULT NULL,
     41 + `docker_remote_api` varchar(255) DEFAULT NULL,
    40 42   `docker_storage_dir` varchar(255) DEFAULT NULL,
    41 43   `containerd_storage_dir` varchar(255) DEFAULT NULL,
    42 44   `docker_subnet` varchar(255) DEFAULT NULL,
    skipped 313 lines
  • ■ ■ ■ ■ ■ ■
    pkg/dto/cluster.go
    skipped 61 lines
    62 62   KubeServiceNodePortRange string `json:"kubeServiceNodePortRange"`
    63 63   
    64 64   RuntimeType string `json:"runtimeType"`
     65 + DockerMirrorRegistry string `json:"dockerMirrorRegistry"`
     66 + DockerRemoteApi string `json:"dockerRemoteApi"`
    65 67   DockerSubnet string `json:"dockerSubnet"`
    66 68   DockerStorageDir string `json:"dockerStorageDir"`
    67 69   ContainerdStorageDir string `json:"containerdStorageDir"`
    skipped 140 lines
    208 210   }
    209 211   cluster.SpecRuntime = model.ClusterSpecRuntime{
    210 212   RuntimeType: c.RuntimeType,
     213 + DockerMirrorRegistry: c.DockerMirrorRegistry,
     214 + DockerRemoteApi: c.DockerRemoteApi,
    211 215   DockerStorageDir: c.DockerStorageDir,
    212 216   ContainerdStorageDir: c.ContainerdStorageDir,
    213 217   DockerSubnet: c.DockerSubnet,
    skipped 52 lines
  • ■ ■ ■ ■ ■ ■
    pkg/dto/cluster_import.go
    skipped 42 lines
    43 43   CalicoIpv4PoolIpip string `json:"calicoIpv4PoolIpip"`
    44 44   
    45 45   RuntimeType string `json:"runtimeType"`
     46 + DockerMirrorRegistry string `json:"dockerMirrorRegistry"`
     47 + DockerRemoteApi string `json:"dockerRemoteApi"`
    46 48   DockerSubnet string `json:"dockerSubnet"`
    47 49   DockerStorageDir string `json:"dockerStorageDir"`
    48 50   ContainerdStorageDir string `json:"containerdStorageDir"`
    skipped 108 lines
    157 159   }
    158 160   cluster.SpecRuntime = model.ClusterSpecRuntime{
    159 161   RuntimeType: c.KoClusterInfo.RuntimeType,
     162 + DockerMirrorRegistry: c.KoClusterInfo.DockerMirrorRegistry,
     163 + DockerRemoteApi: c.KoClusterInfo.DockerRemoteApi,
    160 164   DockerStorageDir: c.KoClusterInfo.DockerStorageDir,
    161 165   ContainerdStorageDir: c.KoClusterInfo.ContainerdStorageDir,
    162 166   DockerSubnet: c.KoClusterInfo.DockerSubnet,
    skipped 72 lines
  • ■ ■ ■ ■ ■ ■
    pkg/model/cluster.go
    skipped 492 lines
    493 493   if c.SpecRuntime.RuntimeType != "" {
    494 494   result[facts.ContainerRuntimeFactName] = c.SpecRuntime.RuntimeType
    495 495   }
     496 + if c.SpecRuntime.DockerMirrorRegistry != "" {
     497 + result[facts.DockerMirrorRegistryFactName] = c.SpecRuntime.DockerMirrorRegistry
     498 + }
     499 + if c.SpecRuntime.DockerRemoteApi != "" {
     500 + result[facts.DockerRemoteApiFactName] = c.SpecRuntime.DockerRemoteApi
     501 + }
    496 502   if c.SpecRuntime.DockerStorageDir != "" {
    497 503   result[facts.DockerStorageDirFactName] = c.SpecRuntime.DockerStorageDir
    498 504   }
    skipped 90 lines
  • ■ ■ ■ ■ ■ ■
    pkg/model/cluster_spec.go
    skipped 28 lines
    29 29   ClusterID string `json:"-"`
    30 30   
    31 31   RuntimeType string `json:"runtimeType"`
     32 + DockerMirrorRegistry string `json:"dockerMirrorRegistry"`
     33 + DockerRemoteApi string `json:"dockerRemoteApi"`
    32 34   DockerStorageDir string `json:"dockerStorageDir"`
    33 35   ContainerdStorageDir string `json:"containerdStorageDir"`
    34 36   DockerSubnet string `json:"dockerSubnet"`
    skipped 78 lines
  • ■ ■ ■ ■ ■ ■
    pkg/service/cluster/adm/facts/default.go
    skipped 17 lines
    18 18   KubeServiceNodePortRangeFactName = "kube_service_node_port_range"
    19 19   
    20 20   DockerVersionFactName = "docker_version"
     21 + DockerMirrorRegistryFactName = "docker_mirror_registry"
     22 + DockerRemoteApiFactName = "docker_remote_api"
    21 23   ContainerdVersionFactName = "containerd_version"
    22 24   ContainerRuntimeFactName = "container_runtime"
    23 25   ContainerdStorageDirFactName = "containerd_storage_dir"
    skipped 96 lines
    120 122   NodeportAddressFactName: "",
    121 123   KubeServiceNodePortRangeFactName: "30000-32767",
    122 124   KubeletRootDirFactName: "/var/lib/kubelet",
     125 + DockerMirrorRegistryFactName: "enable",
     126 + DockerRemoteApiFactName: "disable",
    123 127   DockerStorageDirFactName: "/var/lib/docker",
    124 128   ContainerdStorageDirFactName: "/var/lib/containerd",
    125 129   BinDirFactName: "/usr/local/bin",
    skipped 56 lines
Please wait...
Page is in error, reload to recover