Skip to content
Snippets Groups Projects
Verified Commit ca9cef19 authored by Vincent Sellier's avatar Vincent Sellier
Browse files

graphq: Configure the statsd properties to have the metrics in prometheus

Related to swh/infra/sysadm-environment#4804
parent a9b15f88
No related branches found
No related tags found
1 merge request!36graphq: Configure the statsd properties to have the metrics in prometheus
......@@ -45,6 +45,10 @@ spec:
initialDelaySeconds: 10
periodSeconds: 5
env:
- name: STATSD_HOST
value: {{ $.Values.statsdExternalHost | default "prometheus-statsd-exporter" }}
- name: STATSD_PORT
value: {{ $.Values.statsdPort | default "9125" | quote }}
- name: PORT
value: "5013"
- name: LOG_LEVEL
......
......@@ -29,6 +29,12 @@ tests:
- equal:
path: spec.template.spec.containers[?(@.name == "graphql")].env[?(@.name == "LOG_LEVEL")].value
value: "INFO"
- equal:
path: spec.template.spec.containers[?(@.name == "graphql")].env[?(@.name == "STATSD_HOST")].value
value: prometheus-statsd-exporter
- equal:
path: spec.template.spec.containers[?(@.name == "graphql")].env[?(@.name == "STATSD_PORT")].value
value: "9125"
- isNull:
path: spec.template.spec.containers[?(@.name == "graphql")].env[?(@.name == "THREADS")]
- isNull:
......@@ -83,7 +89,7 @@ tests:
path: spec.template.spec.containers[?(@.name == "graphql")].env[?(@.name == "SWH_SENTRY_DSN")].valueFrom.secretKeyRef.key
value: graphql-sentry-dsn
- it: Graphql sentry default configuration
- it: Graphql sentry overridden configuration
templates:
- graphql/deployment.yaml
set:
......@@ -107,3 +113,20 @@ tests:
- equal:
path: spec.template.spec.containers[?(@.name == "graphql")].env[?(@.name == "SWH_SENTRY_DSN")].valueFrom.secretKeyRef.key
value: my-key
- it: Graphql statsd overridden configuration
templates:
- graphql/deployment.yaml
set:
graphql.enabled: true
swh_graphql_image: image
swh_graphql_image_version: version
statsdExternalHost: my-statsd-host
statsdPort: 9999
asserts:
- equal:
path: spec.template.spec.containers[?(@.name == "graphql")].env[?(@.name == "STATSD_HOST")].value
value: my-statsd-host
- equal:
path: spec.template.spec.containers[?(@.name == "graphql")].env[?(@.name == "STATSD_PORT")].value
value: "9999"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment