-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Edit hostNetwork through the k8s property #1772
Conversation
event/manager.go
Outdated
//server: end.URL, | ||
//暂时 rbd-eventlog-agent:6366 | ||
//server: option.Config.EventLogServer[0] + ":6363", | ||
server: "rbd-eventlog-agent:6366", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这应该是允许参数配置的吧,而不是写死
@@ -51,6 +51,8 @@ func (c *Dis) discoverEventServer() { | |||
var servers []string | |||
for _, en := range re.List { | |||
if en.URL != "" { | |||
// rbd-eventlog-agent:6363 | |||
en.URL = option.Config.EventLogServer[0] + ":6363" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个端口一定会是6363 吗
server := getTCPConnConfig(s.serviceID, s.config["stream-server"]) | ||
if server == s.writer.server { | ||
// TODO:bug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
什么bug?
return getLogAddress(cluster) | ||
//return getLogAddress(cluster) | ||
//rbd-eventlog-agent:6362 | ||
return option.Config.EventLogServer[0] + ":6362" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要写死,固定参数可配置
worker/appm/conversion/version.go
Outdated
//HostNetwork: func() bool { | ||
// if _, ok := as.ExtensionSet["hostnetwork"]; ok { | ||
// return true | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有用的注释删除掉,但是建议这部分做个兼容,避免低版本rainbond 用户已经使用了这个环境变量,发布的模版在新版本无法正常使用
worker/appm/conversion/version.go
Outdated
@@ -155,6 +156,11 @@ func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error { | |||
HostIPC: createHostIPC(as, dbmanager), | |||
}, | |||
} | |||
// 如果参数配置了IsHostNetwork,那么使用k8s属性去修改 | |||
var s *option.Worker | |||
if s.Config.IsHostNetwork { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加了全局的 hostNetwork 变量是干嘛的呢?设置这个参数,让 worker 生成的所有pod全部使用 hostNetwork 模式?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目的是做个兼容,如果新版本,需要用k8s属性的模式去改hostNetwork,就设置IsHostNetwork = true,否则默认IsHostNetwork = false,使用环境变量的方式去改hostNetwork。这里命名不是很规范,“IsHostNetwork”有歧义,稍后修改更详细一点。
cmd/node/option/conf.go
Outdated
fs.StringVar(&a.RuntimeEndpoint, "runtime-endpoint", sources.RuntimeEndpointContainerd, "container runtime endpoint") | ||
// rbd-eventlog service | ||
fs.StringVar(&a.EventServer, "event-server", "", "service name of event-server") | ||
fs.StringVar(&a.LogAddress, "log-address", "", "service name of log-address") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你新增的这两个参数有啥区别呢,在参数说明里,能否给出配置示例
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在说明里还是没有给出配置示例
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
Signed-off-by: banghao <[email protected]>
No description provided.