Support set k8s namespace
This commit is contained in:
parent
ad5ece8c33
commit
f13654dbce
|
@ -135,6 +135,12 @@ cluster.autoclean = 5m
|
|||
## Value: String
|
||||
## cluster.k8s.app_name = emq
|
||||
|
||||
## Kubernates Namespace
|
||||
##
|
||||
## Value: String
|
||||
## cluster.k8s.namespace = default
|
||||
|
||||
|
||||
##--------------------------------------------------------------------
|
||||
## Node Args
|
||||
##--------------------------------------------------------------------
|
||||
|
|
|
@ -124,6 +124,10 @@
|
|||
{datatype, string}
|
||||
]}.
|
||||
|
||||
{mapping, "cluster.k8s.namespace", "ekka.cluster_discovery", [
|
||||
{datatype, string}
|
||||
]}.
|
||||
|
||||
{translation, "ekka.cluster_discovery", fun(Conf) ->
|
||||
Strategy = cuttlefish:conf_get("cluster.discovery", Conf),
|
||||
Filter = fun(Opts) -> [{K, V} || {K, V} <- Opts, V =/= undefined] end,
|
||||
|
@ -152,7 +156,8 @@
|
|||
[{apiserver, cuttlefish:conf_get("cluster.k8s.apiserver", Conf)},
|
||||
{service_name, cuttlefish:conf_get("cluster.k8s.service_name", Conf)},
|
||||
{address_type, cuttlefish:conf_get("cluster.k8s.address_type", Conf, ip)},
|
||||
{app_name, cuttlefish:conf_get("cluster.k8s.app_name", Conf)}];
|
||||
{app_name, cuttlefish:conf_get("cluster.k8s.app_name", Conf)},
|
||||
{namespace, cuttlefish:conf_get("cluster.k8s.namespace", Conf)}];
|
||||
(manual) ->
|
||||
[ ]
|
||||
end,
|
||||
|
|
Loading…
Reference in New Issue