diff --git a/charts/text-embeddings-inference/Chart.yaml b/charts/text-embeddings-inference/Chart.yaml index 8f7da14..abe0099 100644 --- a/charts/text-embeddings-inference/Chart.yaml +++ b/charts/text-embeddings-inference/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.4 +version: 0.1.5 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/text-embeddings-inference/templates/servicemonitor.yaml b/charts/text-embeddings-inference/templates/servicemonitor.yaml new file mode 100644 index 0000000..3aafde6 --- /dev/null +++ b/charts/text-embeddings-inference/templates/servicemonitor.yaml @@ -0,0 +1,28 @@ +{{- if .Values.serviceMonitor.enabled -}} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "text-embeddings-inference.fullname" . }}-servicemonitor + {{- if .Values.serviceMonitor.namespace }} + namespace: {{ .Values.serviceMonitor.namespace }} + {{- end }} + labels: + {{- include "text-embeddings-inference.labels" . | nindent 4 }} + {{- with .Values.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + selector: + matchLabels: + {{- include "text-embeddings-inference.selectorLabels" . | nindent 6 }} + endpoints: + - port: http + interval: {{ .Values.serviceMonitor.interval }} + scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} + path: {{ .Values.serviceMonitor.path }} + jobLabel: {{ include "text-embeddings-inference.fullname" . }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end -}} + diff --git a/charts/text-embeddings-inference/values.yaml b/charts/text-embeddings-inference/values.yaml index 04360fb..9c6bd2b 100644 --- a/charts/text-embeddings-inference/values.yaml +++ b/charts/text-embeddings-inference/values.yaml @@ -65,6 +65,20 @@ service: type: ClusterIP port: 80 +serviceMonitor: + # Enable the creation of a ServiceMonitor resource + enabled: false + # Specify the namespace the ServiceMonitor resource should be created in + namespace: "" + # Specify the interval at which metrics should be scraped + interval: 30s + # Specify the scrape timeout + scrapeTimeout: 10s + # path to scrape for metrics + path: /metrics + # additional labels to add to the ServiceMonitor + additionalLabels: {} + ingress: enabled: false className: "" diff --git a/charts/text-generation-inference/Chart.yaml b/charts/text-generation-inference/Chart.yaml index 5497d68..d3df05a 100644 --- a/charts/text-generation-inference/Chart.yaml +++ b/charts/text-generation-inference/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.3 +version: 0.1.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/text-generation-inference/templates/servicemonitor.yaml b/charts/text-generation-inference/templates/servicemonitor.yaml new file mode 100644 index 0000000..929f7c6 --- /dev/null +++ b/charts/text-generation-inference/templates/servicemonitor.yaml @@ -0,0 +1,28 @@ +{{- if .Values.serviceMonitor.enabled -}} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "text-generation-inference.fullname" . }}-servicemonitor + {{- if .Values.serviceMonitor.namespace }} + namespace: {{ .Values.serviceMonitor.namespace }} + {{- end }} + labels: + {{- include "text-generation-inference.labels" . | nindent 4 }} + {{- with .Values.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + selector: + matchLabels: + {{- include "text-generation-inference.selectorLabels" . | nindent 6 }} + endpoints: + - port: http + interval: {{ .Values.serviceMonitor.interval }} + scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} + path: {{ .Values.serviceMonitor.path }} + jobLabel: {{ include "text-generation-inference.fullname" . }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end -}} + diff --git a/charts/text-generation-inference/values.yaml b/charts/text-generation-inference/values.yaml index c70d57c..9dd2836 100644 --- a/charts/text-generation-inference/values.yaml +++ b/charts/text-generation-inference/values.yaml @@ -65,6 +65,20 @@ service: type: ClusterIP port: 80 +serviceMonitor: + # Enable the creation of a ServiceMonitor resource + enabled: false + # Specify the namespace the ServiceMonitor resource should be created in + namespace: "" + # Specify the interval at which metrics should be scraped + interval: 30s + # Specify the scrape timeout + scrapeTimeout: 10s + # path to scrape for metrics + path: /metrics + # additional labels to add to the ServiceMonitor + additionalLabels: {} + ingress: enabled: false className: ""