From fe2ae12191c80bb2d58319d048a07fc8e3aad312 Mon Sep 17 00:00:00 2001 From: Payman Touliat Date: Wed, 1 Jul 2020 11:17:42 -0700 Subject: [PATCH 1/2] allow independent installation of grafana and prometheus --- .../templates/grafana/grafana-net-2115-dashboard-configmap.yaml | 2 ++ .../templates/grafana/metrics-test-dashboard-configmap.yaml | 2 ++ helm-charts/seldon-core-analytics/templates/grafana/newdb.yaml | 2 ++ .../grafana/prediction-analytics-dashboard-configmap.yaml | 2 ++ .../templates/prometheus/alertmanager-config-configmap.yaml | 2 ++ .../templates/prometheus/prometheus-rules-configmap.yaml | 2 ++ .../templates/prometheus/prometheus-server-conf-configmap.yaml | 2 ++ 7 files changed, 14 insertions(+) diff --git a/helm-charts/seldon-core-analytics/templates/grafana/grafana-net-2115-dashboard-configmap.yaml b/helm-charts/seldon-core-analytics/templates/grafana/grafana-net-2115-dashboard-configmap.yaml index 24fca3260e..d1be2f07a8 100644 --- a/helm-charts/seldon-core-analytics/templates/grafana/grafana-net-2115-dashboard-configmap.yaml +++ b/helm-charts/seldon-core-analytics/templates/grafana/grafana-net-2115-dashboard-configmap.yaml @@ -1,3 +1,4 @@ +{{- if .Values.grafana.enabled }} apiVersion: v1 data: {{ (.Files.Glob "files/grafana/configs/grafana-net-2115-dashboard.json").AsConfig | indent 2 }} @@ -8,3 +9,4 @@ metadata: namespace: {{ .Release.Namespace }} labels: seldon_dashboard: "1" +{{- end }} diff --git a/helm-charts/seldon-core-analytics/templates/grafana/metrics-test-dashboard-configmap.yaml b/helm-charts/seldon-core-analytics/templates/grafana/metrics-test-dashboard-configmap.yaml index cfc1a172b9..c80ccb6618 100644 --- a/helm-charts/seldon-core-analytics/templates/grafana/metrics-test-dashboard-configmap.yaml +++ b/helm-charts/seldon-core-analytics/templates/grafana/metrics-test-dashboard-configmap.yaml @@ -1,3 +1,4 @@ +{{- if .Values.grafana.enabled }} apiVersion: v1 data: {{ (.Files.Glob "files/grafana/configs/metrics-test-dashboard.json").AsConfig | indent 2 }} @@ -8,3 +9,4 @@ metadata: namespace: {{ .Release.Namespace }} labels: seldon_dashboard: "1" +{{- end }} diff --git a/helm-charts/seldon-core-analytics/templates/grafana/newdb.yaml b/helm-charts/seldon-core-analytics/templates/grafana/newdb.yaml index 061502d76d..5ff87a0ca4 100644 --- a/helm-charts/seldon-core-analytics/templates/grafana/newdb.yaml +++ b/helm-charts/seldon-core-analytics/templates/grafana/newdb.yaml @@ -1,3 +1,4 @@ +{{- if .Values.grafana.enabled }} apiVersion: v1 data: {{ (.Files.Glob "files/grafana/configs/newdb.json").AsConfig | indent 2 }} @@ -8,3 +9,4 @@ metadata: namespace: {{ .Release.Namespace }} labels: seldon_dashboard: "1" +{{- end }} diff --git a/helm-charts/seldon-core-analytics/templates/grafana/prediction-analytics-dashboard-configmap.yaml b/helm-charts/seldon-core-analytics/templates/grafana/prediction-analytics-dashboard-configmap.yaml index 5458e1a6ec..b68ebd460b 100644 --- a/helm-charts/seldon-core-analytics/templates/grafana/prediction-analytics-dashboard-configmap.yaml +++ b/helm-charts/seldon-core-analytics/templates/grafana/prediction-analytics-dashboard-configmap.yaml @@ -1,3 +1,4 @@ +{{- if .Values.grafana.enabled }} apiVersion: v1 data: {{ (.Files.Glob "files/grafana/configs/predictions-analytics-dashboard.json").AsConfig | indent 2 }} @@ -8,3 +9,4 @@ metadata: namespace: {{ .Release.Namespace }} labels: seldon_dashboard: "1" +{{- end }} diff --git a/helm-charts/seldon-core-analytics/templates/prometheus/alertmanager-config-configmap.yaml b/helm-charts/seldon-core-analytics/templates/prometheus/alertmanager-config-configmap.yaml index 85f2278891..9d63fb9ede 100644 --- a/helm-charts/seldon-core-analytics/templates/prometheus/alertmanager-config-configmap.yaml +++ b/helm-charts/seldon-core-analytics/templates/prometheus/alertmanager-config-configmap.yaml @@ -1,3 +1,4 @@ +{{- if .Values.prometheus.enabled }} apiVersion: v1 data: {{- if .Values.alertmanager.config.enabled }} @@ -19,3 +20,4 @@ metadata: creationTimestamp: null name: alertmanager-server-conf namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/helm-charts/seldon-core-analytics/templates/prometheus/prometheus-rules-configmap.yaml b/helm-charts/seldon-core-analytics/templates/prometheus/prometheus-rules-configmap.yaml index a64f2cc4bf..882e12a918 100644 --- a/helm-charts/seldon-core-analytics/templates/prometheus/prometheus-rules-configmap.yaml +++ b/helm-charts/seldon-core-analytics/templates/prometheus/prometheus-rules-configmap.yaml @@ -1,3 +1,4 @@ +{{- if .Values.prometheus.enabled }} apiVersion: v1 data: {{ (.Files.Glob "files/prometheus/rules/*.rules").AsConfig | indent 2 }} @@ -6,3 +7,4 @@ metadata: creationTimestamp: null name: prometheus-rules namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/helm-charts/seldon-core-analytics/templates/prometheus/prometheus-server-conf-configmap.yaml b/helm-charts/seldon-core-analytics/templates/prometheus/prometheus-server-conf-configmap.yaml index 87ffe76d24..4deb379e04 100644 --- a/helm-charts/seldon-core-analytics/templates/prometheus/prometheus-server-conf-configmap.yaml +++ b/helm-charts/seldon-core-analytics/templates/prometheus/prometheus-server-conf-configmap.yaml @@ -1,3 +1,4 @@ +{{- if .Values.prometheus.enabled }} apiVersion: v1 data: {{ (.Files.Glob "files/prometheus/prometheus-config.yaml").AsConfig | indent 2 }} @@ -6,3 +7,4 @@ metadata: creationTimestamp: null name: prometheus-server-conf namespace: {{ .Release.Namespace }} +{{- end }} From c9c0de5bed99d04b203a61fe8e26386866c6a437 Mon Sep 17 00:00:00 2001 From: Payman Touliat Date: Wed, 1 Jul 2020 19:39:22 -0700 Subject: [PATCH 2/2] add .enabled to grafana and prometheus --- helm-charts/seldon-core-analytics/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helm-charts/seldon-core-analytics/values.yaml b/helm-charts/seldon-core-analytics/values.yaml index f3956df261..253fda90d3 100644 --- a/helm-charts/seldon-core-analytics/values.yaml +++ b/helm-charts/seldon-core-analytics/values.yaml @@ -1,4 +1,5 @@ grafana: + enabled: true adminUser: admin adminPassword: password sidecar: @@ -19,6 +20,7 @@ alertmanager: rbac: enabled: true prometheus: + enabled: true service_type: ClusterIP server: name: seldon