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
[Controller] parse kvm support run.xml #6022
base: main
Are you sure you want to change the base?
Conversation
2ffb03b
to
c1ba789
Compare
c1ba789
to
806f5c5
Compare
## 可通过此配置将虚拟机名称指定为 domain.name、domain.title、domain.uuid 之一,默认为空 | ||
## 当使用此配置指定的字段取不到虚拟机名称或虚拟机名称为空时,则将使用 domain.name 的值作为虚拟机名称 | ||
## 例:vm_name_field: title ,指定 domain.title 作为虚拟机的名称 | ||
#vm_name_field: "" |
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.
domian.metadata.instance.name ?
@@ -292,6 +292,12 @@ controller: | |||
# 忽略网卡正则表达式配置,匹配到会忽略该网卡,默认为 ^(kube-ipvs) ,增加其他的网卡名称需要在此基础上新增 | |||
ignore_nic_regex: | |||
|
|||
## 采集器同步 KVM ,解析虚拟机的 XML 时,默认使用 domian.metadata.instance.name 字段作为虚拟机的名称 | |||
## 可通过此配置将虚拟机名称指定为 domain.name、domain.title、domain.uuid 之一,默认为空 |
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.
默认为空改掉。
默认肯定有个行为,比如是 domain.name ?
@@ -27,4 +27,5 @@ type GenesisConfig struct { | |||
MultiNSMode bool `default:"false" yaml:"multi_ns_mode"` | |||
SingleVPCMode bool `default:"false" yaml:"single_vpc_mode"` | |||
IgnoreNICRegex string `default:"^(kube-ipvs)" yaml:"ignore_nic_regex"` | |||
VMNameField string `default:"" yaml:"vm_name_field"` |
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.
这个 config 读取之后应该有一个 validate 的过程。在 validate 中就将 default 值设置上去(发现是空的时候)。
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.
This PR is for: