diff --git a/apps/emqx_conf/i18n/emqx_conf_schema.conf b/apps/emqx_conf/i18n/emqx_conf_schema.conf index 8c02a4912..edef14a9c 100644 --- a/apps/emqx_conf/i18n/emqx_conf_schema.conf +++ b/apps/emqx_conf/i18n/emqx_conf_schema.conf @@ -353,17 +353,14 @@ It is refreshed automatically, as long as the node is alive. cluster_k8s_address_type { desc { - en: """Address type used for connecting to the discovered nodes.""" + en: """Address type used for connecting to the discovered nodes. +setting cluster.k8s.address_type to ip will +make EMQX to discover IP addresses of peer nodes from Kubernetes API. +""" zh: """当使用 k8s 方式集群时,address_type 用来从 Kubernetes 接口的应答里获取什么形式的 Host 列表。 -指定 cluster.k8s.address_type 为 ip,则将从 Kubernetes 接口中获取 emqx 服务的 IP 地址列表: -- 172.16.122.31
-- 172.16.122.32
-- 172.16.122.33
-然后与 cluster.k8s.app_name 配置指定的 app name 拼接,得到 emqx 节点列表:
-- emqx@172.16.122.31 -- emqx@172.16.122.32 -- emqx@172.16.122.33 - """ +指定 cluster.k8s.address_typeip,则将从 Kubernetes 接口中获取集群中其他节点 +的IP地址。 +""" } label { 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 node.name -before the '@'.
-For example, if the node.name is emqx@127.0.0.1, then this parameter -should be set to emqx.""" - zh: """app_name 用来跟获取的 Host 列表拼接,得到节点列表。
-当 cluster.discovery_strategy 为 k8s 时,此配置项才有效。 - """ - } - label { - en: "K8s App Name" - zh: "K8s 节点名前缀" - } - } - cluster_k8s_namespace { desc { en: """Kubernetes namespace.""" diff --git a/apps/emqx_conf/src/emqx_conf_schema.erl b/apps/emqx_conf/src/emqx_conf_schema.erl index c7fdc3b98..ce4d112ac 100644 --- a/apps/emqx_conf/src/emqx_conf_schema.erl +++ b/apps/emqx_conf/src/emqx_conf_schema.erl @@ -364,15 +364,6 @@ fields(cluster_k8s) -> 'readOnly' => true } )}, - {"app_name", - sc( - string(), - #{ - default => "emqx", - 'readOnly' => true, - desc => ?DESC(cluster_k8s_app_name) - } - )}, {"namespace", sc( string(), @@ -1320,7 +1311,6 @@ options(k8s, Conf) -> {apiserver, conf_get("cluster.k8s.apiserver", Conf)}, {service_name, conf_get("cluster.k8s.service_name", Conf)}, {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)}, {suffix, conf_get("cluster.k8s.suffix", Conf, "")} ]; diff --git a/deploy/charts/emqx/templates/StatefulSet.yaml b/deploy/charts/emqx/templates/StatefulSet.yaml index 02c2ec02c..5138cf40f 100644 --- a/deploy/charts/emqx/templates/StatefulSet.yaml +++ b/deploy/charts/emqx/templates/StatefulSet.yaml @@ -117,8 +117,6 @@ spec: env: - name: EMQX_NAME value: {{ .Release.Name }} - - name: EMQX_CLUSTER__K8S__APP_NAME - value: {{ .Release.Name }} - name: EMQX_CLUSTER__DISCOVERY_STRATEGY value: k8s - name: EMQX_CLUSTER__K8S__SERVICE_NAME