Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
kondratyevd committed Feb 13, 2025
1 parent 0d1da03 commit eead4f6
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 46 deletions.
8 changes: 4 additions & 4 deletions helm/supersonic/dashboards/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
Expand Down Expand Up @@ -197,7 +197,7 @@
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
"showLegend": false
},
"tooltip": {
"mode": "multi",
Expand Down Expand Up @@ -462,7 +462,7 @@
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
"showLegend": false
},
"tooltip": {
"mode": "multi",
Expand Down Expand Up @@ -910,7 +910,7 @@
"calcs": [],
"displayMode": "list",
"placement": "right",
"showLegend": true
"showLegend": false
},
"tooltip": {
"mode": "multi",
Expand Down
12 changes: 10 additions & 2 deletions helm/supersonic/dashboards/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"type": "prometheus",
"uid": "prometheus"
},
"definition": "label_values({app=\"supersonic\",namespace=\"%NAMESPACE%\"},release)",
"definition": "label_values({app=\"%CHART_NAME%\",namespace=\"%NAMESPACE%\"},release)",
"hide": 0,
"includeAll": true,
"label": "Release",
Expand All @@ -23,7 +23,7 @@
"options": [],
"query": {
"qryType": 1,
"query": "label_values({app=\"supersonic\",namespace=\"%NAMESPACE%\"},release)",
"query": "label_values({app=\"%CHART_NAME%\",namespace=\"%NAMESPACE%\"},release)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
Expand Down Expand Up @@ -56,6 +56,14 @@
"skipUrlSync": false,
"type": "constant"
},
{
"hide": 2,
"label": "Version",
"name": "version",
"query": "%CHART_NAME%",
"skipUrlSync": false,
"type": "constant"
},
{
"hide": 2,
"label": "Prometheus URL",
Expand Down
17 changes: 2 additions & 15 deletions helm/supersonic/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,10 @@ SuperSONIC chart successfully installed!
| * equal to release name, unless nameOverride is specified.
└-----------------------------------------------------------------------------┘

Scaling metric:{{ if not ( eq .Values.prometheus.serverLoadMetric "" ) }} {{ .Values.prometheus.serverLoadMetric }}{{ else }}{{ include "supersonic.defaultMetric" . | nindent 4 }}{{ end }}
Scaling metric:{{ if not ( eq .Values.serverLoadMetric "" ) }} {{ .Values.serverLoadMetric }}{{ else }}{{ include "supersonic.defaultMetric" . | nindent 4 }}{{ end }}

Scaling threshold: {{ include "supersonic.serverLoadThreshold" . }}{{"\n"}}
Scaling threshold: {{ include "supersonic.defaultThreshold" . }}

{{- if or (and .Values.grafana.enabled (eq (include "supersonic.grafanaExists" .) "true")) (eq (include "supersonic.prometheusExists" .) "true") .Values.prometheus.external }}
┌-----------------------------------------------------------------------------┐
| NOTICE: Using existing/external monitoring components
{{- if and .Values.grafana.enabled (eq (include "supersonic.grafanaExists" .) "true") }}
| • Re-using existing Grafana instance
{{- end }}
{{- if .Values.prometheus.external }}
| • Using external Prometheus instance
{{- else if (eq (include "supersonic.prometheusExists" .) "true") }}
| • Re-using existing Prometheus instance
{{- end }}
└-----------------------------------------------------------------------------┘
{{- end }}
┌-----------------------------------------------------------------------------┐
| Documentation: https://fastmachinelearning.org/SuperSONIC
|
Expand Down
3 changes: 1 addition & 2 deletions helm/supersonic/templates/default-dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ data:
{{- /* Replace template variables with actual values */ -}}
{{- $dashboard := $dashboard | replace "%RELEASE_NAME%" .Release.Name }}
{{- $dashboard := $dashboard | replace "%CHART_NAME%" .Chart.Name }}
{{- $dashboard := $dashboard | replace "%CHART_VERSION%" .Chart.Version }}
{{- $dashboard := $dashboard | replace "%NAMESPACE%" .Release.Namespace }}
{{- $dashboard := $dashboard | replace "%SERVER_LOAD_METRIC%" $metric }}
{{- $dashboard := $dashboard | replace "%SERVER_LOAD_THRESHOLD%" $threshold }}
{{- $dashboard := $dashboard | replace "%PROMETHEUS_URL_FULL%" $prometheus_url }}
{{- $dashboard := $dashboard | replace "%HEADER%" $header }}
{{- $dashboard := $dashboard | replace "%CHART_NAME%" .Chart.Name }}
{{- $dashboard := $dashboard | replace "%NAMESPACE%" .Release.Namespace }}
{{ $dashboard | nindent 4 }}
{{- end }}
31 changes: 8 additions & 23 deletions helm/supersonic/templates/prometheus-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,20 @@ data:
evaluation_interval: {{ .Values.prometheus.server.global.evaluation_interval }}
scrape_configs:
- job_name: 'monitoring/{{ include "supersonic.name" . }}/0'
honor_timestamps: true
scheme: http
follow_redirects: true
enable_http2: true
- job_name: "{{ include "supersonic.tritonName" . }}"
kubernetes_sd_configs:
- role: endpoints
- role: pod
namespaces:
names:
- "{{ .Release.Namespace }}"
metrics_path: /metrics
relabel_configs:
# Filter by app name only
- source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name]
regex: {{ .Chart.Name }}
- source_labels: [__meta_kubernetes_pod_label_app_kubernetes_io_component]
regex: "triton"
action: keep
# Set metrics path based on component
- source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_component]
action: replace
target_label: __metrics_path__
regex: envoy
replacement: /stats/prometheus
- source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_component]
action: replace
target_label: __metrics_path__
regex: triton
replacement: /metrics
# Add standard labels
- source_labels: [__meta_kubernetes_namespace]
target_label: namespace
- source_labels: [__meta_kubernetes_pod_container_port_number]
action: keep
regex: "8002"
- source_labels: [__meta_kubernetes_pod_name]
target_label: pod
- source_labels: [__meta_kubernetes_pod_label_app_kubernetes_io_instance]
Expand Down

0 comments on commit eead4f6

Please sign in to comment.