feat(helm chart): prometheus monitoring namespace and release name should be configurable (#914)
* feat(helm chart): prometheus monitoring namespace and release name should be configurable Currently Speckle assumes prometheus is deployed in the 'speckle' namespace and is deployed as a release named 'kube-prometheus-stack'. This commit introduces non-breaking changes that allow custom values for these to be provided, defaulting to the current assumed values if they are not provided. fixes https://github.com/specklesystems/speckle-server/issues/863 * Fix serviceMonitor so that it can find services in a different namespace * Namespace selector is not required if the default namespace is being used
This commit is contained in:
Родитель
65a00dca2e
Коммит
fb5631bd32
|
@ -1,19 +1,22 @@
|
|||
{{ if .Values.enable_prometheus_monitoring }}
|
||||
|
||||
{{- if .Values.enable_prometheus_monitoring }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: speckle-server
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ default .Values.namespace .Values.prometheusMonitoring.namespace }}
|
||||
labels:
|
||||
app: speckle-server
|
||||
release: kube-prometheus-stack
|
||||
release: {{ default "kube-prometheus-stack" .Values.prometheusMonitoring.release }}
|
||||
{{ include "speckle.labels" . | indent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
project: speckle-server
|
||||
{{- if and .Values.prometheusMonitoring.namespace (ne .Values.namespace .Values.prometheusMonitoring.namespace) }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Values.namespace }}
|
||||
{{- end }}
|
||||
endpoints:
|
||||
- port: web
|
||||
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -124,6 +124,9 @@ test:
|
|||
secretName: server-vars
|
||||
|
||||
enable_prometheus_monitoring: false
|
||||
prometheusMonitoring:
|
||||
namespace: ''
|
||||
release: ''
|
||||
cert_manager_issuer: letsencrypt-staging
|
||||
|
||||
helm_test_enabled: true
|
||||
|
|
Загрузка…
Ссылка в новой задаче