feat(charts): add pod disruption budget to ee
This commit is contained in:
parent
74c4731c4a
commit
2d67c96553
|
@ -0,0 +1,18 @@
|
|||
{{- if and (.Values.pdb.enabled) (.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget") }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "emqx.fullname" . }}-pdb
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "emqx.name" . }}
|
||||
helm.sh/chart: {{ include "emqx.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "emqx.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
|
@ -121,7 +121,7 @@ spec:
|
|||
port: {{ .Values.service.mqtt | default 1883 }}
|
||||
protocol: TCP
|
||||
targetPort: mqtt
|
||||
{{- if not (empty .Values.emqxConfig.EMQX_LISTENERS__TCP__DEFAULT) }}
|
||||
{{- if not (empty .Values.emqxConfig.EMQX_LISTENERS__TCP__INTERNAL__BIND) }}
|
||||
- name: internalmqtt
|
||||
port: {{ .Values.service.internalmqtt | default 11883 }}
|
||||
protocol: TCP
|
||||
|
|
|
@ -102,7 +102,7 @@ initContainers: {}
|
|||
# sysctl -w net.netfilter.nf_conntrack_max=1000000
|
||||
# sysctl -w net.netfilter.nf_conntrack_tcp_timeout_time_wait=30
|
||||
|
||||
## 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-enterprise)
|
||||
emqxConfig:
|
||||
EMQX_CLUSTER__DISCOVERY_STRATEGY: "dns"
|
||||
EMQX_DASHBOARD__DEFAULT_USERNAME: "admin"
|
||||
|
@ -229,3 +229,10 @@ ssl:
|
|||
issuer:
|
||||
name: letsencrypt-dns
|
||||
kind: ClusterIssuer
|
||||
|
||||
## Setting PodDisruptionBudget.
|
||||
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
|
||||
##
|
||||
pdb:
|
||||
enabled: false
|
||||
maxUnavailable: 1
|
||||
|
|
|
@ -38,7 +38,7 @@ spec:
|
|||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if not (empty .Values.emqxConfig.EMQX_LISTENERS__TCP__DEFAULT) }}
|
||||
{{- if not (empty .Values.emqxConfig.EMQX_LISTENERS__TCP__INTERNAL__BIND) }}
|
||||
- name: internalmqtt
|
||||
port: {{ .Values.service.internalmqtt | default 11883 }}
|
||||
protocol: TCP
|
||||
|
|
Loading…
Reference in New Issue