96 lines
2.9 KiB
Diff
96 lines
2.9 KiB
Diff
|
|
From eda6e567b9d4f67dccd6f7426cea7d75fb870473 Mon Sep 17 00:00:00 2001
|
|||
|
|
From: haozi007 <liuhao27@huawei.com>
|
|||
|
|
Date: Thu, 24 Jun 2021 14:16:19 +0800
|
|||
|
|
Subject: [PATCH 02/14] default open ports for coredns
|
|||
|
|
|
|||
|
|
Signed-off-by: haozi007 <liuhao27@huawei.com>
|
|||
|
|
---
|
|||
|
|
cmd/configs.go | 14 ++++++++++++++
|
|||
|
|
config/centos.config | 9 +++++++++
|
|||
|
|
docs/manual.md | 2 ++
|
|||
|
|
.../binary/infrastructure/infrastructure.go | 3 +--
|
|||
|
|
4 files changed, 26 insertions(+), 2 deletions(-)
|
|||
|
|
|
|||
|
|
diff --git a/cmd/configs.go b/cmd/configs.go
|
|||
|
|
index be91ba9..d52fcb3 100644
|
|||
|
|
--- a/cmd/configs.go
|
|||
|
|
+++ b/cmd/configs.go
|
|||
|
|
@@ -547,6 +547,20 @@ func createDeployConfigTemplate(file string) error {
|
|||
|
|
Protocol: "tcp",
|
|||
|
|
},
|
|||
|
|
},
|
|||
|
|
+ "master": {
|
|||
|
|
+ &api.OpenPorts{
|
|||
|
|
+ Port: 53,
|
|||
|
|
+ Protocol: "tcp",
|
|||
|
|
+ },
|
|||
|
|
+ &api.OpenPorts{
|
|||
|
|
+ Port: 53,
|
|||
|
|
+ Protocol: "udp",
|
|||
|
|
+ },
|
|||
|
|
+ &api.OpenPorts{
|
|||
|
|
+ Port: 9153,
|
|||
|
|
+ Protocol: "tcp",
|
|||
|
|
+ },
|
|||
|
|
+ },
|
|||
|
|
},
|
|||
|
|
PackageSrc: api.PackageSrcConfig{
|
|||
|
|
Type: "tar.gz",
|
|||
|
|
diff --git a/config/centos.config b/config/centos.config
|
|||
|
|
index 6c0ae26..3ea4bc6 100755
|
|||
|
|
--- a/config/centos.config
|
|||
|
|
+++ b/config/centos.config
|
|||
|
|
@@ -21,6 +21,8 @@ service:
|
|||
|
|
cidr: 10.32.0.0/16
|
|||
|
|
dnsaddr: 10.32.0.10
|
|||
|
|
gateway: 10.32.0.1
|
|||
|
|
+ dns:
|
|||
|
|
+ corednstype: binary
|
|||
|
|
network:
|
|||
|
|
podcidr: 10.244.0.0/16
|
|||
|
|
plugin: ""
|
|||
|
|
@@ -47,6 +49,13 @@ open-ports:
|
|||
|
|
protocol: tcp
|
|||
|
|
- port: 179
|
|||
|
|
protocol: tcp
|
|||
|
|
+ master:
|
|||
|
|
+ - port: 53
|
|||
|
|
+ protocol: tcp
|
|||
|
|
+ - port: 53
|
|||
|
|
+ protocol: udp
|
|||
|
|
+ - port: 9153
|
|||
|
|
+ protocol: udp
|
|||
|
|
package-src:
|
|||
|
|
type: tar.gz
|
|||
|
|
distpath: ""
|
|||
|
|
diff --git a/docs/manual.md b/docs/manual.md
|
|||
|
|
index 1a6aedd..1e9ee65 100644
|
|||
|
|
--- a/docs/manual.md
|
|||
|
|
+++ b/docs/manual.md
|
|||
|
|
@@ -63,6 +63,8 @@ $ tree
|
|||
|
|
```
|
|||
|
|
$ docker save -o images.tar calico/node:v3.19.1 calico/cni:v3.19.1 calico/kube-controllers:v3.19.1 calico/pod2daemon-flexvol:v3.19.1 k8s.gcr.io/pause:3.2
|
|||
|
|
|
|||
|
|
+- 如果coredns使用pod的方式部署,则images.tar里面需要包含coredns的镜像,而coredns对应的二进制包可以删除。
|
|||
|
|
+
|
|||
|
|
3) 准备eggo部署时使用的yaml配置文件。可以使用下面的命令生成一个模板配置,并打开yaml文件对其进行增删改来满足不同的部署需求。
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
diff --git a/pkg/clusterdeployment/binary/infrastructure/infrastructure.go b/pkg/clusterdeployment/binary/infrastructure/infrastructure.go
|
|||
|
|
index 1a490ea..46c9629 100644
|
|||
|
|
--- a/pkg/clusterdeployment/binary/infrastructure/infrastructure.go
|
|||
|
|
+++ b/pkg/clusterdeployment/binary/infrastructure/infrastructure.go
|
|||
|
|
@@ -35,8 +35,7 @@ import (
|
|||
|
|
var itask *task.TaskInstance
|
|||
|
|
|
|||
|
|
var (
|
|||
|
|
- // TODO: coredns open ports should be config by user
|
|||
|
|
- MasterPorts = []string{"6443/tcp", "10252/tcp", "10251/tcp", "53/tcp", "53/udp", "9153/tcp"}
|
|||
|
|
+ MasterPorts = []string{"6443/tcp", "10252/tcp", "10251/tcp"}
|
|||
|
|
WorkPorts = []string{"10250/tcp", "10256/tcp"}
|
|||
|
|
EtcdPosts = []string{"2379-2381/tcp"}
|
|||
|
|
)
|
|||
|
|
--
|
|||
|
|
2.25.1
|
|||
|
|
|