From 9af38f6eb053d22c5759a3c32e310e44fed5e7f8 Mon Sep 17 00:00:00 2001 From: Luna Stadler Date: Tue, 5 Mar 2024 16:21:28 +0100 Subject: [PATCH] [operator] Reject invalid/unknown properties using `additionalProperties: false` This can catch misspellings like the one below, which I encountered when using this Helm chart myself (but the previous validation did not catch it): Error: values don't meet the specifications of the schema(s) in the following chart(s): opentelemetry-operator: - (root): Additional property kubeRBACPRoxy is not allowed --- .../opentelemetry-operator/values.schema.json | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/charts/opentelemetry-operator/values.schema.json b/charts/opentelemetry-operator/values.schema.json index 4473ad6ac..6dfb56288 100644 --- a/charts/opentelemetry-operator/values.schema.json +++ b/charts/opentelemetry-operator/values.schema.json @@ -23,6 +23,7 @@ "securityContext", "testFramework" ], + "additionalProperties": false, "properties": { "replicaCount": { "type": "integer", @@ -58,6 +59,7 @@ "minAvailable", "maxUnavailable" ], + "additionalProperties": false, "properties": { "create": { "type": "boolean", @@ -119,6 +121,7 @@ "rolling", "securityContext" ], + "additionalProperties": false, "properties": { "image": { "type": "object", @@ -128,6 +131,7 @@ "repository", "tag" ], + "additionalProperties": false, "properties": { "repository": { "type": "string", @@ -159,6 +163,7 @@ "repository", "tag" ], + "additionalProperties": false, "properties": { "repository": { "type": "string", @@ -190,6 +195,7 @@ "repository", "tag" ], + "additionalProperties": false, "properties": { "repository": { "type": "string", @@ -221,6 +227,7 @@ "repository", "tag" ], + "additionalProperties": false, "properties": { "repository": { "type": "string", @@ -255,6 +262,7 @@ "dotnet", "go" ], + "additionalProperties": false, "properties": { "java": { "type": "object", @@ -264,6 +272,7 @@ "repository", "tag" ], + "additionalProperties": false, "properties": { "repository": { "type": "string", @@ -295,6 +304,7 @@ "repository", "tag" ], + "additionalProperties": false, "properties": { "repository": { "type": "string", @@ -326,6 +336,7 @@ "repository", "tag" ], + "additionalProperties": false, "properties": { "repository": { "type": "string", @@ -357,6 +368,7 @@ "repository", "tag" ], + "additionalProperties": false, "properties": { "repository": { "type": "string", @@ -388,6 +400,7 @@ "repository", "tag" ], + "additionalProperties": false, "properties": { "repository": { "type": "string", @@ -452,6 +465,7 @@ "webhookPort", "healthzPort" ], + "additionalProperties": false, "properties": { "metricsPort": { "type": "integer", @@ -492,12 +506,14 @@ "limits", "requests" ], + "additionalProperties": false, "properties": { "limits": { "type": "object", "default": {}, "title": "The limits Schema", "required": [], + "additionalProperties": false, "properties": { "cpu": { "type": "string", @@ -529,6 +545,7 @@ "cpu", "memory" ], + "additionalProperties": false, "properties": { "cpu": { "type": "string", @@ -571,6 +588,7 @@ "required": [ "ENABLE_WEBHOOKS" ], + "additionalProperties": false, "properties": { "ENABLE_WEBHOOKS": { "type": "string", @@ -593,6 +611,7 @@ "create", "annotations" ], + "additionalProperties": false, "properties": { "create": { "type": "boolean", @@ -626,6 +645,7 @@ "annotations", "metricsEndpoints" ], + "additionalProperties": false, "properties": { "enabled": { "type": "boolean", @@ -662,6 +682,7 @@ "required": [ "port" ], + "additionalProperties": false, "properties": { "port": { "type": "string", @@ -719,6 +740,7 @@ "extraLabels", "annotations" ], + "additionalProperties": false, "properties": { "enabled": { "type": "boolean", @@ -744,6 +766,7 @@ "required": [ "enabled" ], + "additionalProperties": false, "properties": { "enabled": { "type": "boolean", @@ -801,6 +824,7 @@ "required": [ "enabled" ], + "additionalProperties": false, "properties": { "enabled": { "type": "boolean", @@ -826,6 +850,7 @@ "minAllowed", "updatePolicy" ], + "additionalProperties": false, "properties": { "enabled": { "type": "boolean", @@ -1031,6 +1056,7 @@ "extraArgs", "securityContext" ], + "additionalProperties": false, "properties": { "enabled": { "type": "boolean", @@ -1048,6 +1074,7 @@ "repository", "tag" ], + "additionalProperties": false, "properties": { "repository": { "type": "string", @@ -1078,6 +1105,7 @@ "required": [ "proxyPort" ], + "additionalProperties": false, "properties": { "proxyPort": { "type": "integer", @@ -1100,12 +1128,14 @@ "limits", "requests" ], + "additionalProperties": false, "properties": { "limits": { "type": "object", "default": {}, "title": "The limits Schema", "required": [], + "additionalProperties": false, "properties": { "cpu": { "type": "string", @@ -1137,6 +1167,7 @@ "cpu", "memory" ], + "additionalProperties": false, "properties": { "cpu": { "type": "string", @@ -1234,6 +1265,7 @@ "secretAnnotations", "secretLabels" ], + "additionalProperties": false, "properties": { "create": { "type": "boolean", @@ -1274,6 +1306,7 @@ "required": [ "failurePolicy" ], + "additionalProperties": false, "properties": { "failurePolicy": { "type": "string", @@ -1330,6 +1363,7 @@ "certificateAnnotations", "issuerAnnotations" ], + "additionalProperties": false, "properties": { "enabled": { "type": "boolean", @@ -1379,6 +1413,7 @@ "enabled", "recreate" ], + "additionalProperties": false, "properties": { "enabled": { "type": "boolean", @@ -1478,6 +1513,7 @@ "required": [ "create" ], + "additionalProperties": false, "properties": { "create": { "type": "boolean", @@ -1499,6 +1535,7 @@ "required": [ "create" ], + "additionalProperties": false, "properties": { "create": { "type": "boolean", @@ -1573,6 +1610,7 @@ "runAsUser", "fsGroup" ], + "additionalProperties": false, "properties": { "runAsGroup": { "type": "integer", @@ -1621,6 +1659,7 @@ "required": [ "image" ], + "additionalProperties": false, "properties": { "image": { "type": "object", @@ -1630,6 +1669,7 @@ "repository", "tag" ], + "additionalProperties": false, "properties": { "repository": { "type": "string",