mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 01:38:32 +00:00
This PR contains improvements to the DataHaven deployment infrastructure: 1. Directory restructure: Moved from `deployment/` to `deploy/` (more common for K8s / Helm -based deployment configs). 2. Added **local environment** support: updated CLI to support deploying to a local K8s cluster. 3. Manual deployment script: `deploy/scripts/deploy.sh` for manual deployments. 4. Environment-specific configurations: Structured values files for each environment. 5. Chart organization: Renamed bridges-common-relay to relay for clarity. --------- Co-authored-by: Gonza Montiel <gon.montiel@gmail.com> Co-authored-by: Gonza Montiel <gonzamontiel@users.noreply.github.com>
82 lines
No EOL
2.6 KiB
YAML
82 lines
No EOL
2.6 KiB
YAML
{{- if .Values.node.serviceMonitor.enabled }}
|
|
{{ $fullname := include "node.fullname" . }}
|
|
{{ $serviceLabels := include "node.serviceLabels" . }}
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: {{ $fullname }}
|
|
{{- if $.Values.node.serviceMonitor.namespace }}
|
|
namespace: {{ $.Values.node.serviceMonitor.namespace }}
|
|
{{- else }}
|
|
namespace: {{ $.Release.Namespace }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "node.labels" . | nindent 4 }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- $serviceLabels | nindent 6 }}
|
|
endpoints:
|
|
- port: prometheus
|
|
path: /metrics
|
|
{{- if $.Values.node.serviceMonitor.interval }}
|
|
interval: {{ $.Values.node.serviceMonitor.interval }}
|
|
{{- end }}
|
|
{{- if $.Values.node.serviceMonitor.scrapeTimeout }}
|
|
scrapeTimeout: {{ $.Values.node.serviceMonitor.scrapeTimeout }}
|
|
honorLabels: true
|
|
{{- end }}
|
|
{{- with .Values.node.serviceMonitor.relabelings }}
|
|
relabelings:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.node.serviceMonitor.metricRelabelings }}
|
|
metricRelabelings:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.node.collatorRelayChain.prometheus.enabled }}
|
|
- port: prom-relaychain
|
|
path: /metrics
|
|
{{- if $.Values.node.serviceMonitor.interval }}
|
|
interval: {{ $.Values.node.serviceMonitor.interval }}
|
|
{{- end }}
|
|
{{- if $.Values.node.serviceMonitor.scrapeTimeout }}
|
|
scrapeTimeout: {{ $.Values.node.serviceMonitor.scrapeTimeout }}
|
|
honorLabels: true
|
|
{{- end }}
|
|
{{- with .Values.node.serviceMonitor.relabelings }}
|
|
relabelings:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.node.serviceMonitor.metricRelabelings }}
|
|
metricRelabelings:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.substrateApiSidecar.metrics.enabled }}
|
|
- port: prom-sidecar
|
|
path: /metrics
|
|
{{- if $.Values.node.serviceMonitor.interval }}
|
|
interval: {{ $.Values.node.serviceMonitor.interval }}
|
|
{{- end }}
|
|
{{- if $.Values.node.serviceMonitor.scrapeTimeout }}
|
|
scrapeTimeout: {{ $.Values.node.serviceMonitor.scrapeTimeout }}
|
|
honorLabels: true
|
|
{{- end }}
|
|
{{- with .Values.node.serviceMonitor.relabelings }}
|
|
relabelings:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.node.serviceMonitor.metricRelabelings }}
|
|
metricRelabelings:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
namespaceSelector:
|
|
matchNames:
|
|
- {{ $.Release.Namespace }}
|
|
{{- with $.Values.node.serviceMonitor.targetLabels }}
|
|
targetLabels:
|
|
{{- toYaml .| nindent 4 }}
|
|
{{- end}}
|
|
{{- end }} |