mirror of https://github.com/helm/helm
The jsonschema compiler was not configured to enforce format constraints (e.g. ipv4, ipv6, email) defined in values.schema.json. This caused helm lint to silently accept invalid values that violated format rules. Enable format assertions by calling compiler.AssertFormat() so that format keywords are enforced during schema validation. Closes #31788 Signed-off-by: Munem Hashmi <munem.hashmi@gmail.com>pull/31937/head
parent
d3df72e560
commit
05813ffa55
@ -0,0 +1,3 @@
|
||||
ipAddress4: "invalid-ip"
|
||||
ipAddress6: "2001:0db8:85a3:0000:0000:8a2e:0370:7334:11111111"
|
||||
email: "invalid-email"
|
||||
@ -0,0 +1,23 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Values",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ipAddress4": {
|
||||
"description": "IPv4 address",
|
||||
"type": "string",
|
||||
"format": "ipv4"
|
||||
},
|
||||
"ipAddress6": {
|
||||
"description": "IPv6 address",
|
||||
"type": "string",
|
||||
"format": "ipv6"
|
||||
},
|
||||
"email": {
|
||||
"description": "Email address",
|
||||
"type": "string",
|
||||
"format": "email"
|
||||
}
|
||||
},
|
||||
"required": ["email", "ipAddress4", "ipAddress6"]
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
ipAddress4: "192.168.1.1"
|
||||
ipAddress6: "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
|
||||
email: "user@example.com"
|
||||
Loading…
Reference in new issue