Skip to content

Commit

Permalink
[blockscout-stack] Adding podMonitor for frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
nzenchik committed Apr 5, 2024
1 parent 535b005 commit d2a44f5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
6 changes: 6 additions & 0 deletions charts/blockscout-stack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLog

## 1.5.0

### Feature

- Add PodMonitor for frontend

## 1.4.4

### Feature
Expand Down
4 changes: 2 additions & 2 deletions charts/blockscout-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ 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: 1.4.4
version: 1.5.0

# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "6.1.0"
appVersion: "6.3.0"
4 changes: 4 additions & 0 deletions charts/blockscout-stack/templates/frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ spec:
- name: NEXT_PUBLIC_STATS_API_HOST
value: "https://{{ .Values.stats.ingress.hostname }}"
{{- end }}
{{- if .Values.config.prometheus.enabled }}
- name: PROMETHEUS_METRICS_ENABLED
value: "true"
{{- end }}
{{- range $key, $value := .Values.frontend.env }}
- name: {{ $key }}
value: {{ $value | quote }}
Expand Down
15 changes: 15 additions & 0 deletions charts/blockscout-stack/templates/frontend-podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if and .Values.frontend.enabled .Values.config.prometheus.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ include "blockscout-stack.fullname" . }}-frontend-podmonitor
labels:
{{- include "blockscout-stack.labels" . | nindent 4 }}
spec:
podMetricsEndpoints:
- port: http
path: /node-api/metrics
selector:
matchLabels:
app: {{ .Release.Name }}-frontend
{{- end }}

0 comments on commit d2a44f5

Please sign in to comment.