Merge pull request #9388 from Gala-R/fix-helm-chart-bug
fix: helm chart headless service name error
This commit is contained in:
commit
ed4a975a80
|
@ -27,3 +27,5 @@
|
||||||
- Fix get trace list crash when trace not initialize. [#9156](https://github.com/emqx/emqx/pull/9156)
|
- Fix get trace list crash when trace not initialize. [#9156](https://github.com/emqx/emqx/pull/9156)
|
||||||
|
|
||||||
- Fix create trace sometime failed by end_at time has already passed. [#9156](https://github.com/emqx/emqx/pull/9156)
|
- Fix create trace sometime failed by end_at time has already passed. [#9156](https://github.com/emqx/emqx/pull/9156)
|
||||||
|
|
||||||
|
- Fix the `Discovery error: no such service` error that occurred during helm chart deployment, resulting in an abnormal discovery of cluster nodes. [#9388](https://github.com/emqx/emqx/pull/9388)
|
||||||
|
|
|
@ -24,3 +24,5 @@
|
||||||
- 修复日志追踪模块没开启时,GET Trace 列表接口报错的问题。[#9156](https://github.com/emqx/emqx/pull/9156)
|
- 修复日志追踪模块没开启时,GET Trace 列表接口报错的问题。[#9156](https://github.com/emqx/emqx/pull/9156)
|
||||||
|
|
||||||
- 修复创建追踪日志时偶尔会报`end_at time has already passed`错误,导致创建失败。[#9156](https://github.com/emqx/emqx/pull/9156)
|
- 修复创建追踪日志时偶尔会报`end_at time has already passed`错误,导致创建失败。[#9156](https://github.com/emqx/emqx/pull/9156)
|
||||||
|
|
||||||
|
- 修复 helm chart 部署时出现`Discovery error: no such service`错误,导致集群节点发现异常。[#9388](https://github.com/emqx/emqx/pull/9388)
|
||||||
|
|
|
@ -10,6 +10,19 @@ metadata:
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
data:
|
data:
|
||||||
|
EMQX_NAME: {{ .Release.Name }}
|
||||||
|
{{- if eq (.Values.emqxConfig.EMQX_CLUSTER__DISCOVERY) "k8s" }}
|
||||||
|
EMQX_CLUSTER__K8S__APP_NAME: {{ .Release.Name }}
|
||||||
|
EMQX_CLUSTER__K8S__APISERVER: "https://kubernetes.default.svc:443"
|
||||||
|
EMQX_CLUSTER__K8S__SERVICE_NAME: {{ include "emqx.fullname" . }}-headless
|
||||||
|
EMQX_CLUSTER__K8S__NAMESPACE: {{ .Release.Namespace }}
|
||||||
|
EMQX_CLUSTER__K8S__ADDRESS_TYPE: "hostname"
|
||||||
|
EMQX_CLUSTER__K8S__SUFFIX: "svc.cluster.local"
|
||||||
|
{{- else if eq (.Values.emqxConfig.EMQX_CLUSTER__DISCOVERY) "dns" }}
|
||||||
|
EMQX_CLUSTER__DNS__NAME: "{{ .Release.Name }}-headless.{{ .Release.Namespace }}.svc.cluster.local"
|
||||||
|
EMQX_CLUSTER__DNS__APP: {{ .Release.Name }}
|
||||||
|
EMQX_CLUSTER__DNS__TYPE: "srv"
|
||||||
|
{{- end -}}
|
||||||
{{- range $index, $value := .Values.emqxConfig }}
|
{{- range $index, $value := .Values.emqxConfig }}
|
||||||
{{- if $value }}
|
{{- if $value }}
|
||||||
{{- $key := (regexReplaceAllLiteral "\\." (regexReplaceAllLiteral "EMQX[_\\.]" (upper (trimAll " " $index)) "") "__") }}
|
{{- $key := (regexReplaceAllLiteral "\\." (regexReplaceAllLiteral "EMQX[_\\.]" (upper (trimAll " " $index)) "") "__") }}
|
||||||
|
|
|
@ -72,27 +72,8 @@ initContainers: {}
|
||||||
|
|
||||||
## EMQX configuration item, see the documentation (https://hub.docker.com/r/emqx/emqx)
|
## EMQX configuration item, see the documentation (https://hub.docker.com/r/emqx/emqx)
|
||||||
emqxConfig:
|
emqxConfig:
|
||||||
EMQX_NAME: "{{ .Release.Name }}"
|
|
||||||
|
|
||||||
## Cluster discovery by dns
|
|
||||||
# EMQX_CLUSTER__DISCOVERY: "dns"
|
|
||||||
# EMQX_CLUSTER__DNS__NAME: "{{ .Release.Name }}-headless.{{ .Release.Namespace }}.svc.cluster.local"
|
|
||||||
# EMQX_CLUSTER__DNS__APP: "{{ .Release.Name }}"
|
|
||||||
# EMQX_CLUSTER__DNS__TYPE: "srv"
|
|
||||||
|
|
||||||
## Cluster discovery by k8s
|
## Cluster discovery by k8s
|
||||||
EMQX_CLUSTER__DISCOVERY: "k8s"
|
EMQX_CLUSTER__DISCOVERY: "k8s"
|
||||||
EMQX_CLUSTER__K8S__APP_NAME: "{{ .Release.Name }}"
|
|
||||||
EMQX_CLUSTER__K8S__APISERVER: "https://kubernetes.default.svc:443"
|
|
||||||
EMQX_CLUSTER__K8S__SERVICE_NAME: "{{ .Release.Name }}-headless"
|
|
||||||
EMQX_CLUSTER__K8S__NAMESPACE: "{{ .Release.Namespace }}"
|
|
||||||
## The address type is used to extract host from k8s service.
|
|
||||||
## Value: ip | dns | hostname
|
|
||||||
## Note:Hostname is only supported after v4.0-rc.2
|
|
||||||
EMQX_CLUSTER__K8S__ADDRESS_TYPE: "hostname"
|
|
||||||
EMQX_CLUSTER__K8S__SUFFIX: "svc.cluster.local"
|
|
||||||
## if EMQX_CLUSTER__K8S__ADDRESS_TYPE eq dns
|
|
||||||
# EMQX_CLUSTER__K8S__SUFFIX: "pod.cluster.local"
|
|
||||||
EMQX_MANAGEMENT__DEFAULT_APPLICATION__ID: "admin"
|
EMQX_MANAGEMENT__DEFAULT_APPLICATION__ID: "admin"
|
||||||
EMQX_MANAGEMENT__DEFAULT_APPLICATION__SECRET: "public"
|
EMQX_MANAGEMENT__DEFAULT_APPLICATION__SECRET: "public"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue