From 8850f74f4726897acf5329045aef5ee17446e175 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Wed, 21 Oct 2026 18:59:03 +0200 Subject: [PATCH] Validate receiver chart values with schema --- .../values.schema.json | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 chart/matrix-alertmanager-receiver/values.schema.json diff --git a/chart/matrix-alertmanager-receiver/values.schema.json b/chart/matrix-alertmanager-receiver/values.schema.json new file mode 100644 index 0000000..9c5b1aa --- /dev/null +++ b/chart/matrix-alertmanager-receiver/values.schema.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "replicaCount", + "image", + "service", + "matrix", + "templating", + "serviceMonitor" + ], + "properties": { + "replicaCount": { + "type": "integer", + "minimum": 1 + }, + "image": { + "type": "object", + "required": ["repository", "tag", "pullPolicy"], + "properties": { + "repository": {"type": "string", "minLength": 1}, + "tag": {"type": "string"}, + "pullPolicy": {"type": "string", "enum": ["Always", "IfNotPresent", "Never"]} + }, + "additionalProperties": false + }, + "service": { + "type": "object", + "required": ["type", "port"], + "properties": { + "type": {"type": "string", "enum": ["ClusterIP", "NodePort", "LoadBalancer"]}, + "port": {"type": "integer", "minimum": 1, "maximum": 65535} + }, + "additionalProperties": false + }, + "matrix": { + "type": "object", + "required": ["homeserverUrl", "userId", "roomMapping", "accessTokenSecret"], + "properties": { + "homeserverUrl": {"type": "string", "minLength": 1}, + "userId": {"type": "string", "minLength": 1}, + "roomMapping": { + "type": "object", + "minProperties": 1, + "additionalProperties": {"type": "string", "minLength": 1} + }, + "accessTokenSecret": { + "type": "object", + "required": ["name", "key"], + "properties": { + "name": {"type": "string"}, + "key": {"type": "string", "minLength": 1} + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "templating": { + "type": "object", + "required": ["firing", "resolved"], + "properties": { + "firing": {"type": "string", "minLength": 1}, + "resolved": {"type": "string", "minLength": 1} + }, + "additionalProperties": false + }, + "resources": {"type": "object"}, + "serviceMonitor": { + "type": "object", + "required": ["enabled"], + "properties": { + "enabled": {"type": "boolean"} + }, + "additionalProperties": false + }, + "nameOverride": {"type": "string"}, + "fullnameOverride": {"type": "string"} + }, + "additionalProperties": false +}