From 5a4230a92847da204a4fd4ce4c1d21fffe70772a Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:41:57 -0400 Subject: [PATCH] chore: add schema Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com> --- config/flipt.schema.cue | 24 +++++++++++++++++------- config/flipt.schema.json | 27 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/config/flipt.schema.cue b/config/flipt.schema.cue index 041a8153c2..6a9090e287 100644 --- a/config/flipt.schema.cue +++ b/config/flipt.schema.cue @@ -21,6 +21,7 @@ import "strings" log?: #log meta?: #meta server?: #server + metrics?: #metrics tracing?: #tracing ui?: #ui @@ -81,7 +82,7 @@ import "strings" jwt?: { enabled?: bool | *false validate_claims?: { - issuer?: string + issuer?: string subject?: string audiences?: [...string] } @@ -209,7 +210,7 @@ import "strings" repository: string bundles_directory?: string authentication?: { - type: "aws-ecr" | *"static" + type: "aws-ecr" | *"static" username: string password: string } @@ -269,13 +270,22 @@ import "strings" grpc_conn_max_age_grace?: =~#duration } + #metrics: { + enabled?: bool | *true + exporter?: *"prometheus" | "otlp" + + otlp?: { + endpoint?: string | *"localhost:4317" + } + } + #tracing: { - enabled?: bool | *false - exporter?: *"jaeger" | "zipkin" | "otlp" - samplingRatio?: float & >= 0 & <= 1 | *1 + enabled?: bool | *false + exporter?: *"jaeger" | "zipkin" | "otlp" + samplingRatio?: float & >=0 & <=1 | *1 propagators?: [ - ..."tracecontext" | "baggage" | "b3" | "b3multi" | "jaeger" | "xray" | "ottrace" | "none" - ] | *["tracecontext", "baggage"] + ..."tracecontext" | "baggage" | "b3" | "b3multi" | "jaeger" | "xray" | "ottrace" | "none", + ] | *["tracecontext", "baggage"] jaeger?: { enabled?: bool | *false diff --git a/config/flipt.schema.json b/config/flipt.schema.json index e51eb6330f..97fdb41fe1 100644 --- a/config/flipt.schema.json +++ b/config/flipt.schema.json @@ -928,6 +928,33 @@ "required": [], "title": "Server" }, + "metrics": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "type": "boolean", + "default": true + }, + "exporter": { + "type": "string", + "enum": ["prometheus", "otlp"], + "default": "prometheus" + }, + "otlp": { + "type": "object", + "additionalProperties": false, + "properties": { + "endpoint": { + "type": "string", + "default": "localhost:4317" + } + }, + "title": "OTLP" + } + }, + "title": "Metrics" + }, "tracing": { "type": "object", "additionalProperties": false,