[KYUUBI #5212] Fix configuration errors causing by helm charts of prometheus services
### _Why are the changes needed?_ This bug will affect k8s deployments. https://github.com/apache/kyuubi/issues/5212 ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request ### _Was this patch authored or co-authored using generative AI tooling?_ No Closes #5281 from FourSpaces/fix_k8s_deployment_error. Closes #5212 484da7e97 [伟程] Remove the monitoring.prometheus.server node that is not being used temporarily 90396c17f [伟程] Specification format 1773c7cd0 [wei.cheng] Separate the configuration of Prometheus from other components. 59159eb7b [伟程] Fix configuration errors causing by k8s deployment of prometheus services. Lead-authored-by: 伟程 <cheng1483x@gmail.com> Co-authored-by: wei.cheng <cheng1483x@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
parent
9a409956a1
commit
5eba900ed1
@ -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:
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 }}
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user