diff --git a/charts/kyuubi/templates/kyuubi-alert.yaml b/charts/kyuubi/templates/kyuubi-alert.yaml index 8637e9e0395..89fd11dc708 100644 --- a/charts/kyuubi/templates/kyuubi-alert.yaml +++ b/charts/kyuubi/templates/kyuubi-alert.yaml @@ -15,7 +15,7 @@ limitations under the License. */}} -{{- if and .Values.server.prometheus.enabled (eq .Values.metricsReporters "PROMETHEUS") .Values.prometheusRule.enabled }} +{{- if and .Values.monitoring.prometheus.enabled (eq .Values.metricsReporters "PROMETHEUS") .Values.prometheusRule.enabled }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: diff --git a/charts/kyuubi/templates/kyuubi-configmap.yaml b/charts/kyuubi/templates/kyuubi-configmap.yaml index 1e5e195d399..62413567d76 100644 --- a/charts/kyuubi/templates/kyuubi-configmap.yaml +++ b/charts/kyuubi/templates/kyuubi-configmap.yaml @@ -38,7 +38,7 @@ data: kyuubi.frontend.protocols={{ include "kyuubi.frontend.protocols" . }} # Kyuubi Metrics - kyuubi.metrics.enabled={{ .Values.server.prometheus.enabled }} + kyuubi.metrics.enabled={{ .Values.monitoring.prometheus.enabled }} kyuubi.metrics.reporters={{ .Values.metricsReporters }} ## User provided Kyuubi configurations diff --git a/charts/kyuubi/templates/kyuubi-headless-service.yaml b/charts/kyuubi/templates/kyuubi-headless-service.yaml index 895859bac2c..fa04ffeef42 100644 --- a/charts/kyuubi/templates/kyuubi-headless-service.yaml +++ b/charts/kyuubi/templates/kyuubi-headless-service.yaml @@ -30,6 +30,11 @@ spec: port: {{ tpl $frontend.service.port $ }} targetPort: {{ $frontend.port }} {{- end }} + {{- if .Values.monitoring.prometheus.enabled }} + - name: prometheus + port: {{ .Values.monitoring.prometheus.port }} + targetPort: {{ .Values.monitoring.prometheus.port }} + {{- end }} selector: {{- include "kyuubi.selectorLabels" $ | nindent 4 }} diff --git a/charts/kyuubi/templates/kyuubi-podmonitor.yaml b/charts/kyuubi/templates/kyuubi-podmonitor.yaml index ea0f762141a..458ff66edb0 100644 --- a/charts/kyuubi/templates/kyuubi-podmonitor.yaml +++ b/charts/kyuubi/templates/kyuubi-podmonitor.yaml @@ -15,7 +15,7 @@ limitations under the License. */}} -{{- if and .Values.server.prometheus.enabled (eq .Values.metricsReporters "PROMETHEUS") .Values.podMonitor.enabled }} +{{- if and .Values.monitoring.prometheus.enabled (eq .Values.metricsReporters "PROMETHEUS") .Values.podMonitor.enabled }} apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: diff --git a/charts/kyuubi/templates/kyuubi-servicemonitor.yaml b/charts/kyuubi/templates/kyuubi-servicemonitor.yaml index 7d997fc1199..11098a0eac2 100644 --- a/charts/kyuubi/templates/kyuubi-servicemonitor.yaml +++ b/charts/kyuubi/templates/kyuubi-servicemonitor.yaml @@ -15,7 +15,7 @@ limitations under the License. */}} -{{- if and .Values.server.prometheus.enabled (eq .Values.metricsReporters "PROMETHEUS") .Values.serviceMonitor.enabled }} +{{- if and .Values.monitoring.prometheus.enabled (eq .Values.metricsReporters "PROMETHEUS") .Values.serviceMonitor.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/kyuubi/templates/kyuubi-statefulset.yaml b/charts/kyuubi/templates/kyuubi-statefulset.yaml index 626796a78d6..309ef8ec9c4 100644 --- a/charts/kyuubi/templates/kyuubi-statefulset.yaml +++ b/charts/kyuubi/templates/kyuubi-statefulset.yaml @@ -75,6 +75,10 @@ spec: containerPort: {{ $frontend.port }} {{- end }} {{- end }} + {{- if .Values.monitoring.prometheus.enabled }} + - name: prometheus + containerPort: {{ .Values.monitoring.prometheus.port }} + {{- end }} {{- if .Values.livenessProbe.enabled }} livenessProbe: exec: diff --git a/charts/kyuubi/values.yaml b/charts/kyuubi/values.yaml index cfc79fae5be..faa854b1017 100644 --- a/charts/kyuubi/values.yaml +++ b/charts/kyuubi/values.yaml @@ -116,15 +116,11 @@ server: nodePort: ~ annotations: {} +monitoring: # Exposes metrics in Prometheus format prometheus: enabled: true port: 10019 - service: - type: ClusterIP - port: "{{ .Values.server.prometheus.port }}" - nodePort: ~ - annotations: {} # $KYUUBI_CONF_DIR directory kyuubiConfDir: /opt/kyuubi/conf