Skip to content

Commit

Permalink
[operator] Reject invalid/unknown properties using `additionalPropert…
Browse files Browse the repository at this point in the history
…ies: 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
  • Loading branch information
heyLu committed Mar 19, 2024
1 parent af4b111 commit 63e8cce
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions charts/opentelemetry-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"securityContext",
"testFramework"
],
"additionalProperties": false,
"properties": {
"replicaCount": {
"type": "integer",
Expand Down Expand Up @@ -58,6 +59,7 @@
"minAvailable",
"maxUnavailable"
],
"additionalProperties": false,
"properties": {
"create": {
"type": "boolean",
Expand Down Expand Up @@ -119,6 +121,7 @@
"rolling",
"securityContext"
],
"additionalProperties": false,
"properties": {
"image": {
"type": "object",
Expand All @@ -128,6 +131,7 @@
"repository",
"tag"
],
"additionalProperties": false,
"properties": {
"repository": {
"type": "string",
Expand Down Expand Up @@ -159,6 +163,7 @@
"repository",
"tag"
],
"additionalProperties": false,
"properties": {
"repository": {
"type": "string",
Expand Down Expand Up @@ -190,6 +195,7 @@
"repository",
"tag"
],
"additionalProperties": false,
"properties": {
"repository": {
"type": "string",
Expand Down Expand Up @@ -221,6 +227,7 @@
"repository",
"tag"
],
"additionalProperties": false,
"properties": {
"repository": {
"type": "string",
Expand Down Expand Up @@ -255,6 +262,7 @@
"dotnet",
"go"
],
"additionalProperties": false,
"properties": {
"java": {
"type": "object",
Expand All @@ -264,6 +272,7 @@
"repository",
"tag"
],
"additionalProperties": false,
"properties": {
"repository": {
"type": "string",
Expand Down Expand Up @@ -295,6 +304,7 @@
"repository",
"tag"
],
"additionalProperties": false,
"properties": {
"repository": {
"type": "string",
Expand Down Expand Up @@ -326,6 +336,7 @@
"repository",
"tag"
],
"additionalProperties": false,
"properties": {
"repository": {
"type": "string",
Expand Down Expand Up @@ -357,6 +368,7 @@
"repository",
"tag"
],
"additionalProperties": false,
"properties": {
"repository": {
"type": "string",
Expand Down Expand Up @@ -388,6 +400,7 @@
"repository",
"tag"
],
"additionalProperties": false,
"properties": {
"repository": {
"type": "string",
Expand Down Expand Up @@ -452,6 +465,7 @@
"webhookPort",
"healthzPort"
],
"additionalProperties": false,
"properties": {
"metricsPort": {
"type": "integer",
Expand Down Expand Up @@ -492,12 +506,14 @@
"limits",
"requests"
],
"additionalProperties": false,
"properties": {
"limits": {
"type": "object",
"default": {},
"title": "The limits Schema",
"required": [],
"additionalProperties": false,
"properties": {
"cpu": {
"type": "string",
Expand Down Expand Up @@ -529,6 +545,7 @@
"cpu",
"memory"
],
"additionalProperties": false,
"properties": {
"cpu": {
"type": "string",
Expand Down Expand Up @@ -571,6 +588,7 @@
"required": [
"ENABLE_WEBHOOKS"
],
"additionalProperties": false,
"properties": {
"ENABLE_WEBHOOKS": {
"type": "string",
Expand All @@ -593,6 +611,7 @@
"create",
"annotations"
],
"additionalProperties": false,
"properties": {
"create": {
"type": "boolean",
Expand Down Expand Up @@ -626,6 +645,7 @@
"annotations",
"metricsEndpoints"
],
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
Expand Down Expand Up @@ -662,6 +682,7 @@
"required": [
"port"
],
"additionalProperties": false,
"properties": {
"port": {
"type": "string",
Expand Down Expand Up @@ -719,6 +740,7 @@
"extraLabels",
"annotations"
],
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
Expand All @@ -744,6 +766,7 @@
"required": [
"enabled"
],
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
Expand Down Expand Up @@ -801,6 +824,7 @@
"required": [
"enabled"
],
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
Expand All @@ -826,6 +850,7 @@
"minAllowed",
"updatePolicy"
],
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
Expand Down Expand Up @@ -1031,6 +1056,7 @@
"extraArgs",
"securityContext"
],
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
Expand All @@ -1048,6 +1074,7 @@
"repository",
"tag"
],
"additionalProperties": false,
"properties": {
"repository": {
"type": "string",
Expand Down Expand Up @@ -1078,6 +1105,7 @@
"required": [
"proxyPort"
],
"additionalProperties": false,
"properties": {
"proxyPort": {
"type": "integer",
Expand All @@ -1100,12 +1128,14 @@
"limits",
"requests"
],
"additionalProperties": false,
"properties": {
"limits": {
"type": "object",
"default": {},
"title": "The limits Schema",
"required": [],
"additionalProperties": false,
"properties": {
"cpu": {
"type": "string",
Expand Down Expand Up @@ -1137,6 +1167,7 @@
"cpu",
"memory"
],
"additionalProperties": false,
"properties": {
"cpu": {
"type": "string",
Expand Down Expand Up @@ -1234,6 +1265,7 @@
"secretAnnotations",
"secretLabels"
],
"additionalProperties": false,
"properties": {
"create": {
"type": "boolean",
Expand Down Expand Up @@ -1274,6 +1306,7 @@
"required": [
"failurePolicy"
],
"additionalProperties": false,
"properties": {
"failurePolicy": {
"type": "string",
Expand Down Expand Up @@ -1330,6 +1363,7 @@
"certificateAnnotations",
"issuerAnnotations"
],
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
Expand Down Expand Up @@ -1379,6 +1413,7 @@
"enabled",
"recreate"
],
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
Expand Down Expand Up @@ -1478,6 +1513,7 @@
"required": [
"create"
],
"additionalProperties": false,
"properties": {
"create": {
"type": "boolean",
Expand All @@ -1499,6 +1535,7 @@
"required": [
"create"
],
"additionalProperties": false,
"properties": {
"create": {
"type": "boolean",
Expand Down Expand Up @@ -1573,6 +1610,7 @@
"runAsUser",
"fsGroup"
],
"additionalProperties": false,
"properties": {
"runAsGroup": {
"type": "integer",
Expand Down Expand Up @@ -1621,6 +1659,7 @@
"required": [
"image"
],
"additionalProperties": false,
"properties": {
"image": {
"type": "object",
Expand All @@ -1630,6 +1669,7 @@
"repository",
"tag"
],
"additionalProperties": false,
"properties": {
"repository": {
"type": "string",
Expand Down

0 comments on commit 63e8cce

Please sign in to comment.