refactor: delete k8s.app_name config
This commit is contained in:
parent
d635d08c7a
commit
05782c4e4e
|
@ -353,17 +353,14 @@ It is refreshed automatically, as long as the node is alive.
|
||||||
|
|
||||||
cluster_k8s_address_type {
|
cluster_k8s_address_type {
|
||||||
desc {
|
desc {
|
||||||
en: """Address type used for connecting to the discovered nodes."""
|
en: """Address type used for connecting to the discovered nodes.
|
||||||
|
setting <code>cluster.k8s.address_type</code> to <code>ip</code> will
|
||||||
|
make EMQX to discover IP addresses of peer nodes from Kubernetes API.
|
||||||
|
"""
|
||||||
zh: """当使用 k8s 方式集群时,address_type 用来从 Kubernetes 接口的应答里获取什么形式的 Host 列表。
|
zh: """当使用 k8s 方式集群时,address_type 用来从 Kubernetes 接口的应答里获取什么形式的 Host 列表。
|
||||||
指定 cluster.k8s.address_type 为 ip,则将从 Kubernetes 接口中获取 emqx 服务的 IP 地址列表:
|
指定 <code>cluster.k8s.address_type</code. 为 <code>ip</code>,则将从 Kubernetes 接口中获取集群中其他节点
|
||||||
- 172.16.122.31 </br>
|
的IP地址。
|
||||||
- 172.16.122.32 </br>
|
"""
|
||||||
- 172.16.122.33 </br>
|
|
||||||
然后与 cluster.k8s.app_name 配置指定的 app name 拼接,得到 emqx 节点列表: </br>
|
|
||||||
- emqx@172.16.122.31
|
|
||||||
- emqx@172.16.122.32
|
|
||||||
- emqx@172.16.122.33
|
|
||||||
"""
|
|
||||||
}
|
}
|
||||||
label {
|
label {
|
||||||
en: "K8s Address Type"
|
en: "K8s Address Type"
|
||||||
|
@ -371,22 +368,6 @@ It is refreshed automatically, as long as the node is alive.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cluster_k8s_app_name {
|
|
||||||
desc {
|
|
||||||
en: """This parameter should be set to the part of the <code>node.name</code>
|
|
||||||
before the '@'.</br>
|
|
||||||
For example, if the <code>node.name</code> is <code>emqx@127.0.0.1</code>, then this parameter
|
|
||||||
should be set to <code>emqx</code>."""
|
|
||||||
zh: """app_name 用来跟获取的 Host 列表拼接,得到节点列表。</br>
|
|
||||||
当 cluster.discovery_strategy 为 k8s 时,此配置项才有效。
|
|
||||||
"""
|
|
||||||
}
|
|
||||||
label {
|
|
||||||
en: "K8s App Name"
|
|
||||||
zh: "K8s 节点名前缀"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cluster_k8s_namespace {
|
cluster_k8s_namespace {
|
||||||
desc {
|
desc {
|
||||||
en: """Kubernetes namespace."""
|
en: """Kubernetes namespace."""
|
||||||
|
|
|
@ -364,15 +364,6 @@ fields(cluster_k8s) ->
|
||||||
'readOnly' => true
|
'readOnly' => true
|
||||||
}
|
}
|
||||||
)},
|
)},
|
||||||
{"app_name",
|
|
||||||
sc(
|
|
||||||
string(),
|
|
||||||
#{
|
|
||||||
default => "emqx",
|
|
||||||
'readOnly' => true,
|
|
||||||
desc => ?DESC(cluster_k8s_app_name)
|
|
||||||
}
|
|
||||||
)},
|
|
||||||
{"namespace",
|
{"namespace",
|
||||||
sc(
|
sc(
|
||||||
string(),
|
string(),
|
||||||
|
@ -1320,7 +1311,6 @@ options(k8s, Conf) ->
|
||||||
{apiserver, conf_get("cluster.k8s.apiserver", Conf)},
|
{apiserver, conf_get("cluster.k8s.apiserver", Conf)},
|
||||||
{service_name, conf_get("cluster.k8s.service_name", Conf)},
|
{service_name, conf_get("cluster.k8s.service_name", Conf)},
|
||||||
{address_type, conf_get("cluster.k8s.address_type", Conf, ip)},
|
{address_type, conf_get("cluster.k8s.address_type", Conf, ip)},
|
||||||
{app_name, conf_get("cluster.k8s.app_name", Conf)},
|
|
||||||
{namespace, conf_get("cluster.k8s.namespace", Conf)},
|
{namespace, conf_get("cluster.k8s.namespace", Conf)},
|
||||||
{suffix, conf_get("cluster.k8s.suffix", Conf, "")}
|
{suffix, conf_get("cluster.k8s.suffix", Conf, "")}
|
||||||
];
|
];
|
||||||
|
|
|
@ -117,8 +117,6 @@ spec:
|
||||||
env:
|
env:
|
||||||
- name: EMQX_NAME
|
- name: EMQX_NAME
|
||||||
value: {{ .Release.Name }}
|
value: {{ .Release.Name }}
|
||||||
- name: EMQX_CLUSTER__K8S__APP_NAME
|
|
||||||
value: {{ .Release.Name }}
|
|
||||||
- name: EMQX_CLUSTER__DISCOVERY_STRATEGY
|
- name: EMQX_CLUSTER__DISCOVERY_STRATEGY
|
||||||
value: k8s
|
value: k8s
|
||||||
- name: EMQX_CLUSTER__K8S__SERVICE_NAME
|
- name: EMQX_CLUSTER__K8S__SERVICE_NAME
|
||||||
|
|
Loading…
Reference in New Issue