Merge "Alertmanager: use endpoints section and lookups to set port"
This commit is contained in:
commit
988c9d97e5
@ -31,7 +31,7 @@ function generate_peers () {
|
|||||||
final_pod_suffix=$(( {{ .Values.pod.replicas.alertmanager }}-1 ))
|
final_pod_suffix=$(( {{ .Values.pod.replicas.alertmanager }}-1 ))
|
||||||
for pod_suffix in `seq 0 "$final_pod_suffix"`
|
for pod_suffix in `seq 0 "$final_pod_suffix"`
|
||||||
do
|
do
|
||||||
echo -mesh.peer={{ .Release.Name }}-$pod_suffix.$DISCOVERY_SVC:6783
|
echo -mesh.peer={{ .Release.Name }}-$pod_suffix.$DISCOVERY_SVC:$MESH_PORT
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ spec:
|
|||||||
clusterIP: None
|
clusterIP: None
|
||||||
ports:
|
ports:
|
||||||
- name: peer-mesh
|
- name: peer-mesh
|
||||||
port: {{ .Values.network.alertmanager.mesh_port }}
|
port: {{ tuple "alerts" "internal" "mesh" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
selector:
|
selector:
|
||||||
{{ tuple $envAll "alertmanager" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
{{ tuple $envAll "alertmanager" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -27,7 +27,7 @@ spec:
|
|||||||
{{ if .Values.network.alertmanager.node_port.enabled }}
|
{{ if .Values.network.alertmanager.node_port.enabled }}
|
||||||
nodePort: {{ .Values.network.alertmanager.node_port.port }}
|
nodePort: {{ .Values.network.alertmanager.node_port.port }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
port: {{ .Values.network.alertmanager.port }}
|
port: {{ tuple "alerts" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
selector:
|
selector:
|
||||||
{{ tuple $envAll "alertmanager" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
{{ tuple $envAll "alertmanager" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
{{ if .Values.network.alertmanager.node_port.enabled }}
|
{{ if .Values.network.alertmanager.node_port.enabled }}
|
||||||
|
@ -81,15 +81,17 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: DISCOVERY_SVC
|
- name: DISCOVERY_SVC
|
||||||
value: {{ tuple "alerts" "discovery" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
value: {{ tuple "alerts" "discovery" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||||
|
- name: MESH_PORT
|
||||||
|
value: {{ tuple "alerts" "internal" "mesh" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
|
||||||
ports:
|
ports:
|
||||||
- name: alerts-api
|
- name: alerts-api
|
||||||
containerPort: {{ .Values.network.alertmanager.port }}
|
containerPort: {{ tuple "alerts" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
- name: peer-mesh
|
- name: peer-mesh
|
||||||
containerPort: {{ .Values.network.alertmanager.mesh_port }}
|
containerPort: {{ tuple "alerts" "internal" "mesh" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /#/status
|
path: /#/status
|
||||||
port: {{ .Values.network.alertmanager.port }}
|
port: {{ tuple "alerts" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
timeoutSeconds: 30
|
timeoutSeconds: 30
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
@ -133,8 +133,6 @@ network:
|
|||||||
node_port:
|
node_port:
|
||||||
enabled: false
|
enabled: false
|
||||||
port: 30903
|
port: 30903
|
||||||
port: 9093
|
|
||||||
mesh_port: 6783
|
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
Loading…
Reference in New Issue
Block a user