From a4d7a9391291fc5597c57a308f6fc82c6ac001de Mon Sep 17 00:00:00 2001 From: jklein Date: Sun, 23 Aug 2026 19:24:42 +0200 Subject: [PATCH] Add strict values.schema.json to gotenberg additionalProperties: false on every chart-owned object level, so a key the chart does not read is rejected at render time instead of being silently ignored. Objects passed verbatim into the pod spec (probes, securityContext, global) stay open - Kubernetes owns their schema there. Major bump: a schema can break existing deployments that carry dead keys. Refs #68 --- gotenberg/Chart.yaml | 2 +- gotenberg/values.schema.json | 139 +++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 gotenberg/values.schema.json diff --git a/gotenberg/Chart.yaml b/gotenberg/Chart.yaml index a9df3af..cef2f3d 100644 --- a/gotenberg/Chart.yaml +++ b/gotenberg/Chart.yaml @@ -5,7 +5,7 @@ icon: https://gotenberg.dev/img/logo.png type: application -version: 4.2.0+up8.36.0 +version: 5.0.0+up8.36.0 appVersion: "8.36.0" maintainers: diff --git a/gotenberg/values.schema.json b/gotenberg/values.schema.json new file mode 100644 index 0000000..1235411 --- /dev/null +++ b/gotenberg/values.schema.json @@ -0,0 +1,139 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "title": "gotenberg values", + "description": "Strict values schema (issue #68). additionalProperties is false on every chart-owned object level, so a key that the chart does not read is rejected at render time instead of being silently ignored. The only objects that stay open are the ones passed verbatim into the Kubernetes pod spec (probes, security contexts, global) - the chart does not interpret their contents, so it cannot judge which keys are meaningful.", + "type": "object", + "additionalProperties": false, + "properties": { + "global": { + "description": "Helm's conventional cross-chart values. Unused by this chart, kept open so an umbrella install cannot break on it.", + "type": "object" + }, + "scaleDown": { + "type": "boolean" + }, + "gotenberg": { + "type": "object", + "additionalProperties": false, + "properties": { + "replicas": { + "type": "integer", + "minimum": 0 + }, + "securityContext": { + "$ref": "#/definitions/securityContext" + }, + "livenessProbe": { + "$ref": "#/definitions/probe" + }, + "readinessProbe": { + "$ref": "#/definitions/probe" + }, + "startupProbe": { + "$ref": "#/definitions/probe" + }, + "env": { + "$ref": "#/definitions/env" + }, + "resources": { + "$ref": "#/definitions/resources" + } + } + } + }, + "definitions": { + "resources": { + "type": "object", + "additionalProperties": false, + "properties": { + "limitFactor": { + "type": "number", + "exclusiveMinimum": 0 + }, + "requests": { + "$ref": "#/definitions/resourceList" + }, + "limits": { + "$ref": "#/definitions/resourceList" + } + } + }, + "resourceList": { + "type": "object", + "additionalProperties": false, + "properties": { + "cpu": { + "type": ["string", "number", "null"] + }, + "memory": { + "type": ["string", "number", "null"] + }, + "ephemeral-storage": { + "type": ["string", "number", "null"] + }, + "ephemeralStorage": { + "type": ["string", "number", "null"] + } + } + }, + "env": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": ["name"], + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "valueFrom": { + "type": "object", + "additionalProperties": false, + "properties": { + "secretKeyRef": { + "$ref": "#/definitions/keyRef" + }, + "configMapKeyRef": { + "$ref": "#/definitions/keyRef" + } + } + } + } + } + }, + "keyRef": { + "type": "object", + "additionalProperties": false, + "required": ["name", "key"], + "properties": { + "name": { + "type": "string" + }, + "key": { + "type": "string" + } + } + }, + "securityContext": { + "type": "object", + "additionalProperties": false, + "properties": { + "pod": { + "description": "Rendered verbatim as the pod's securityContext; kept open because the chart does not interpret it.", + "type": "object" + }, + "container": { + "description": "Rendered verbatim as the container's securityContext; kept open because the chart does not interpret it.", + "type": "object" + } + } + }, + "probe": { + "description": "Rendered verbatim as a container probe; kept open because the chart does not interpret it.", + "type": "object" + } + } +}