Skip to content

Commit bcf5caa

Browse files
committed
fix: tighten values.schema.json validation
- odoo.dbfilter / odoo.db_name: accept a string or the literal false (reject true, which is meaningless for these Odoo fields) - db_replica_port, externalDatabase.port, service.port: bound to 1-65535 (was minimum 0 with no upper bound) - rolloutRestart.activeDeadlineSeconds: minimum 1 (k8s JobSpec rejects 0) Signed-off-by: Alexandre Nuttinck <alexandre@nuttinck.be>
1 parent 4ea13b5 commit bcf5caa

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

values.schema.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@
115115
},
116116
"dbfilter": {
117117
"description": "A regex string, or false to disable (single-tenant).",
118-
"type": ["string", "boolean"]
118+
"anyOf": [{ "type": "string" }, { "const": false }]
119119
},
120120
"db_name": {
121121
"description": "A database name, or false for a multi-tenant (dbfilter) setup.",
122-
"type": ["string", "boolean"]
122+
"anyOf": [{ "type": "string" }, { "const": false }]
123123
},
124124
"db_maxconn": { "type": "integer", "minimum": 0 },
125125
"db_replica_host": { "type": "string" },
126-
"db_replica_port": { "type": "integer", "minimum": 0 },
126+
"db_replica_port": { "type": "integer", "minimum": 1, "maximum": 65535 },
127127
"max_cron_threads": { "type": "integer", "minimum": 0 },
128128
"log_level": { "type": "string" },
129129
"log_handler": { "type": "string" }
@@ -167,7 +167,7 @@
167167
"enum": ["Allow", "Forbid", "Replace"]
168168
},
169169
"backoffLimit": { "type": "integer", "minimum": 0 },
170-
"activeDeadlineSeconds": { "type": "integer", "minimum": 0 },
170+
"activeDeadlineSeconds": { "type": "integer", "minimum": 1 },
171171
"successfulJobsHistoryLimit": { "type": "integer", "minimum": 0 },
172172
"failedJobsHistoryLimit": { "type": "integer", "minimum": 0 },
173173
"restartPolicy": {
@@ -181,7 +181,7 @@
181181
"type": "object",
182182
"properties": {
183183
"host": { "type": "string" },
184-
"port": { "type": "integer", "minimum": 0 },
184+
"port": { "type": "integer", "minimum": 1, "maximum": 65535 },
185185
"name": { "type": "string" },
186186
"user": { "type": "string" },
187187
"password": { "type": "string" }
@@ -237,7 +237,7 @@
237237
"type": "string",
238238
"enum": ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"]
239239
},
240-
"port": { "type": "integer", "minimum": 0 }
240+
"port": { "type": "integer", "minimum": 1, "maximum": 65535 }
241241
}
242242
},
243243
"serviceMonitor": {

0 commit comments

Comments
 (0)