Skip to content

Commit

Permalink
[k8s] add frontend semver metric (#1683)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilou242 authored Nov 21, 2024
1 parent 29c1bcb commit 30abbc0
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion kubernetes/helm/startree-thirdeye/templates/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ spec:
release: {{ .Release.Name }}
component: {{ .Values.ui.name }}
annotations:
{{ toYaml .Values.ui.podAnnotations | indent 8 }}
prometheus.io/scrape: {{ .Values.prometheus.enabled | quote }}
prometheus.io/port: "9090"
prometheus.io/path: "/admin/prometheus"
{{- toYaml .Values.coordinator.podAnnotations | nindent 8 }}
spec:
{{- if .Values.ui.image.pullSecretsName }}
imagePullSecrets:
Expand Down Expand Up @@ -135,6 +138,25 @@ spec:
return 200 "User-agent: *\nDisallow: /\n";
}
}
{{- if .Values.prometheus.enabled }}
server {
listen 9090 {{- if .Values.tls.enabled }} ssl {{- end }};
{{- if .Values.tls.enabled }}
ssl_certificate /home/thirdeye/tls/tls.crt;
ssl_certificate_key /home/thirdeye/tls/tls.key;
ssl_password_file /home/thirdeye/tls-pass/pass;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
{{- end }}
location = /admin/prometheus {
add_header Content-Type text/plain;
{{- if .Values.tls.enabled }}
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
{{- end }}
server_tokens off;
return 200 "thirdeye_version_info_frontend{environment_url="{{ default "unknown" (regexReplaceAll "(https?://)" .Values.ui.publicUrl "") }}",semver="{{ .Values.ui.image.tag }}"} 1.0\n";
}
}
{{- end }}
command:
- /bin/sh
- -c
Expand Down

0 comments on commit 30abbc0

Please sign in to comment.