Skip to content

Feature/telemetry usage #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,34 @@ spec:
- "download-{{ .Values.deployment.ingress.deployment_name }}.{{ .Values.deployment.ingress.common_domain }}"
secretName: {{ .Values.deployment.ingress.downloads.downloads_tls_secret }}

{{ end }} # end of ingress enabled check defined in the beginning
{{ end }} # end of ingress enabled check defined in the beginning

{{ if .Values.telemetry.ingress.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: {{ .Values.global.namespace }}
annotations:
cert-manager.io/cluster-issuer: ov-issuer
dns.operators.ecmwf.int/on-transport-server: vs-transport-https
nginx.org/redirect-to-https: "True"
name: polytope-ingress-telemetry
spec:
ingressClassName: nginx
rules:
- host: "telemetry-{{ .Values.deployment.ingress.deployment_name }}.{{ .Values.deployment.ingress.common_domain }}"
http:
paths:
- backend:
service:
name: {{ .Values.telemetry.host }}
port:
number: {{ .Values.telemetry.port }}
path: /telemetry/v1/metrics
pathType: Prefix
tls:
- hosts:
- "telemetry-{{ .Values.deployment.ingress.deployment_name }}.{{ .Values.deployment.ingress.common_domain }}"
secretName: {{ .Values.telemetry.ingress.telemetry_tls_secret}}
{{ end}}
4 changes: 2 additions & 2 deletions templates/telemetry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ spec:
{{- end }}
readinessProbe:
httpGet:
path: /telemetry/v1/test
path: /telemetry/v1/health
port: {{ .Values.telemetry.port }}
initialDelaySeconds: 1
periodSeconds: 60
periodSeconds: 10
volumes:
- name: config-volume
configMap:
Expand Down
22 changes: 22 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,27 @@ telemetry:
host: telemetry
port: 32012
bind_to: 0.0.0.0
obfuscate_apikeys: True # obfuscate api keys in the endpoints
usage:
enabled: True
cache_expiry_seconds: 30 # set a value similar to prometheus scrape interval, default is 30 seconds
timeframes: # in s/h/d format, it controls the timeframes for which the usage is calculated in /usage endpoint
- 12h
- 1d
- 3d
- 7d
- 30d
ingress:
enabled: false
telemetry_tls_secret: # deployment specific
basic_auth:
enabled: false
log_suppression_ttl: 3600 # in seconds
users:
- attributes: {}
password: # deployment specific
uid: # deployment specific


metric_store:
mongodb:
Expand Down Expand Up @@ -333,6 +354,7 @@ garbage-collector:
interval: 10s
threshold: 1T
age: 3d
metric_age: 30d # we keep processed metrics for long time for /usage endpoint

# The last two sections are very deployment specific, so we're only leaving some examples here
#################################################################################################
Expand Down
Loading