mirror of https://github.com/apache/druid.git
Support prometheus emitter (#13531)
modify helm chart to support scraping from prometheus automatically
This commit is contained in:
parent
c1f283fd31
commit
f3e19f69bb
|
@ -210,5 +210,8 @@ The following table lists the configurable parameters of the Druid chart and the
|
|||
| `router.ingress.path` | path of the router api | `/` |
|
||||
| `router.ingress.annotations` | annotations for the router api ingress | `{}` |
|
||||
| `router.ingress.tls` | TLS configuration for the ingress | `[]` |
|
||||
| `prometheus.enabled` | Support scraping from prometheus | `false` |
|
||||
| `prometheus.port` | expose prometheus port | `9090` |
|
||||
| `prometheus.annotation` | pods annotation to notify prometheus scraping | `{prometheus.io/scrape: "true", prometheus.io/port: "9090"}` |
|
||||
|
||||
Full and up-to-date documentation can be found in the comments of the `values.yaml` file.
|
||||
|
|
|
@ -41,10 +41,15 @@ spec:
|
|||
app: {{ include "druid.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
component: {{ .Values.broker.name }}
|
||||
{{- with .Values.broker.podAnnotations }}
|
||||
annotations:
|
||||
{{- with .Values.broker.podAnnotations }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
{{- with .Values.prometheus.annotation }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
|
@ -67,6 +72,11 @@ spec:
|
|||
- name: http
|
||||
containerPort: {{ .Values.broker.port }}
|
||||
protocol: TCP
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
- name: prometheus
|
||||
containerPort: {{ .Values.prometheus.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 60
|
||||
httpGet:
|
||||
|
|
|
@ -41,10 +41,15 @@ spec:
|
|||
app: {{ include "druid.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
component: {{ .Values.coordinator.name }}
|
||||
{{- with .Values.coordinator.podAnnotations }}
|
||||
annotations:
|
||||
{{- with .Values.coordinator.podAnnotations }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
{{- with .Values.prometheus.annotation }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
|
@ -67,6 +72,11 @@ spec:
|
|||
- name: http
|
||||
containerPort: {{ .Values.coordinator.port }}
|
||||
protocol: TCP
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
- name: prometheus
|
||||
containerPort: {{ .Values.prometheus.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 60
|
||||
httpGet:
|
||||
|
|
|
@ -42,10 +42,15 @@ spec:
|
|||
app: {{ template "druid.name" . }}
|
||||
component: {{ .Values.historical.name }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- with .Values.historical.podAnnotations }}
|
||||
annotations:
|
||||
{{- with .Values.historical.podAnnotations }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
{{- with .Values.prometheus.annotation }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if or .Values.historical.antiAffinity .Values.historical.nodeAffinity }}
|
||||
affinity:
|
||||
|
@ -123,6 +128,11 @@ spec:
|
|||
ports:
|
||||
- containerPort: {{ .Values.historical.port }}
|
||||
name: http
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
- name: prometheus
|
||||
containerPort: {{ .Values.prometheus.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- mountPath: /opt/druid/var/druid/
|
||||
name: data
|
||||
|
|
|
@ -42,10 +42,15 @@ spec:
|
|||
app: {{ template "druid.name" . }}
|
||||
component: {{ .Values.middleManager.name }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- if .Values.middleManager.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.middleManager.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.middleManager.podAnnotations }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
{{- with .Values.prometheus.annotation }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if or .Values.middleManager.antiAffinity .Values.middleManager.nodeAffinity }}
|
||||
affinity:
|
||||
|
@ -123,6 +128,11 @@ spec:
|
|||
ports:
|
||||
- containerPort: {{ .Values.middleManager.port }}
|
||||
name: http
|
||||
{{- if .Values.prometheus.enabled}}
|
||||
- name: prometheus
|
||||
containerPort: {{ .Values.prometheus.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- mountPath: /opt/druid/var/druid/
|
||||
name: data
|
||||
|
|
|
@ -41,10 +41,15 @@ spec:
|
|||
app: {{ include "druid.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
component: {{ .Values.overlord.name }}
|
||||
{{- with .Values.overlord.podAnnotations }}
|
||||
annotations:
|
||||
{{- with .Values.overlord.podAnnotations }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
{{- with .Values.prometheus.annotation }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
|
@ -67,6 +72,11 @@ spec:
|
|||
- name: http
|
||||
containerPort: {{ .Values.overlord.port }}
|
||||
protocol: TCP
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
- name: prometheus
|
||||
containerPort: {{ .Values.prometheus.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 60
|
||||
httpGet:
|
||||
|
|
|
@ -41,10 +41,15 @@ spec:
|
|||
app: {{ include "druid.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
component: {{ .Values.router.name }}
|
||||
{{- with .Values.router.podAnnotations }}
|
||||
annotations:
|
||||
{{- with .Values.router.podAnnotations }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
{{- with .Values.prometheus.annotation }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
|
@ -67,6 +72,11 @@ spec:
|
|||
- name: http
|
||||
containerPort: {{ .Values.router.port }}
|
||||
protocol: TCP
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
- name: prometheus
|
||||
containerPort: {{ .Values.prometheus.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 60
|
||||
httpGet:
|
||||
|
|
|
@ -418,3 +418,10 @@ postgresql:
|
|||
port: 5432
|
||||
|
||||
# Secrets
|
||||
prometheus:
|
||||
enabled: false
|
||||
#pick the any port what you want
|
||||
port: 9090
|
||||
annotation:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9090"
|
||||
|
|
Loading…
Reference in New Issue