Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add monitoring for rest of ChatQnA + DocSum components #655

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions helm-charts/common/data-prep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ curl http://localhost:6007/v1/dataprep \

## Values

| Key | Type | Default | Description |
| ---------------------- | ------ | ----------------------- | ----------- |
| image.repository | string | `"opea/dataprep-redis"` | |
| service.port | string | `"6007"` | |
| REDIS_URL | string | `""` | |
| TEI_EMBEDDING_ENDPOINT | string | `""` | |
| Key | Type | Default | Description |
| ---------------------- | ------ | ----------------------- | ---------------------------------------- |
| image.repository | string | `"opea/dataprep-redis"` | |
| service.port | string | `"6007"` | |
| REDIS_URL | string | `""` | |
| TEI_EMBEDDING_ENDPOINT | string | `""` | |
| global.monitoring | bool | `false` | See ../../monitoring.md before enabling! |

## Milvus support

Expand Down
18 changes: 18 additions & 0 deletions helm-charts/common/data-prep/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.global.monitoring }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "data-prep.fullname" . }}
labels:
release: {{ .Values.global.prometheusRelease }}
spec:
selector:
matchLabels:
{{- include "data-prep.selectorLabels" . | nindent 6 }}
endpoints:
- port: data-prep
interval: 5s
{{- end }}
6 changes: 6 additions & 0 deletions helm-charts/common/data-prep/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,9 @@ global:
# If set, it will overwrite serviceAccount.name.
# If set, and serviceAccount.create is false, it will assume this service account is already created by others.
sharedSAName: ""

# Install Prometheus serviceMonitors for service components
monitoring: false

# Prometheus Helm install release name needed for serviceMonitors
prometheusRelease: prometheus-stack
18 changes: 18 additions & 0 deletions helm-charts/docsum/templates/m2t.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ metadata:
name: {{ .Release.Name }}-m2t
labels:
{{- include "docsum.labels" . | nindent 4 }}
app: {{ .Release.Name }}-m2t
spec:
type: {{ .Values.m2t.service.type }}
ports:
Expand All @@ -95,3 +96,20 @@ spec:
selector:
{{- include "docsum.selectorLabels" . | nindent 4 }}
app: {{ .Release.Name }}-m2t
---
{{- if .Values.global.monitoring }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "docsum.fullname" . }}-m2t
labels:
release: {{ .Values.global.prometheusRelease }}
spec:
selector:
matchLabels:
{{- include "docsum.selectorLabels" . | nindent 6 }}
app: {{ .Release.Name }}-m2t
endpoints:
- port: m2t
interval: 5s
{{- end }}
18 changes: 18 additions & 0 deletions helm-charts/docsum/templates/v2a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ metadata:
name: {{ .Release.Name }}-v2a
labels:
{{- include "docsum.labels" . | nindent 4 }}
app: {{ .Release.Name }}-v2a
spec:
type: {{ .Values.v2a.service.type }}
ports:
Expand All @@ -90,3 +91,20 @@ spec:
selector:
{{- include "docsum.selectorLabels" . | nindent 4 }}
app: {{ .Release.Name }}-v2a
---
{{- if .Values.global.monitoring }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "docsum.fullname" . }}-v2a
labels:
release: {{ .Values.global.prometheusRelease }}
spec:
selector:
matchLabels:
{{- include "docsum.selectorLabels" . | nindent 6 }}
app: {{ .Release.Name }}-v2a
endpoints:
- port: v2a
interval: 5s
{{- end }}
Loading