Add JSON schema generation for kubeconform CRD validation
ci/woodpecker/pr/kubeconform Pipeline failed
ci/woodpecker/pr/pre-commit Pipeline was successful

- ci/generate-schemas.sh extracts schemas from live cluster CRDs via kubectl
- Generated schemas committed to schemas/ for CI use
- Run `make schemas` to regenerate after CRD or K8s version changes
- validate-apps.sh and validate-clusters.sh check local schemas first
- Remove all kubeconform skip lists — all resource types now have schemas
This commit is contained in:
2026-06-28 16:53:11 +10:00
parent cfca1e5278
commit 423287ff3f
264 changed files with 142908 additions and 3 deletions
@@ -0,0 +1,321 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"options": {
"additionalProperties": {
"maxLength": 4096,
"minLength": 0,
"type": "string"
},
"maxProperties": 16,
"type": "object"
},
"targetRefs": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"sectionName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic",
"x-kubernetes-validations": [
{
"message": "sectionName must be specified when targetRefs includes 2 or more references to the same target",
"rule": "self.all(p1, self.all(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name ? ((!has(p1.sectionName) || p1.sectionName == '') == (!has(p2.sectionName) || p2.sectionName == '')) : true))"
},
{
"message": "sectionName must be unique when targetRefs includes 2 or more references to the same target",
"rule": "self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || (has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName))))"
}
]
},
"validation": {
"properties": {
"caCertificateRefs": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"hostname": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"subjectAltNames": {
"items": {
"properties": {
"hostname": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"type": {
"enum": [
"Hostname",
"URI"
],
"type": "string"
},
"uri": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(([^:/?#]+):)(//([^/?#]*))([^?#]*)(\\?([^#]*))?(#(.*))?",
"type": "string"
}
},
"required": [
"type"
],
"type": "object",
"x-kubernetes-validations": [
{
"message": "SubjectAltName element must contain Hostname, if Type is set to Hostname",
"rule": "!(self.type == \"Hostname\" && (!has(self.hostname) || self.hostname == \"\"))"
},
{
"message": "SubjectAltName element must not contain Hostname, if Type is not set to Hostname",
"rule": "!(self.type != \"Hostname\" && has(self.hostname) && self.hostname != \"\")"
},
{
"message": "SubjectAltName element must contain URI, if Type is set to URI",
"rule": "!(self.type == \"URI\" && (!has(self.uri) || self.uri == \"\"))"
},
{
"message": "SubjectAltName element must not contain URI, if Type is not set to URI",
"rule": "!(self.type != \"URI\" && has(self.uri) && self.uri != \"\")"
}
]
},
"maxItems": 5,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"wellKnownCACertificates": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(System|([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]))$",
"type": "string"
}
},
"required": [
"hostname"
],
"type": "object",
"x-kubernetes-validations": [
{
"message": "must not contain both CACertificateRefs and WellKnownCACertificates",
"rule": "!(has(self.caCertificateRefs) && size(self.caCertificateRefs) > 0 && has(self.wellKnownCACertificates) && self.wellKnownCACertificates != \"\")"
},
{
"message": "must specify either CACertificateRefs or WellKnownCACertificates",
"rule": "(has(self.caCertificateRefs) && size(self.caCertificateRefs) > 0 || has(self.wellKnownCACertificates) && self.wellKnownCACertificates != \"\")"
}
]
}
},
"required": [
"targetRefs",
"validation"
],
"type": "object"
},
"status": {
"properties": {
"ancestors": {
"items": {
"properties": {
"ancestorRef": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Gateway",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"sectionName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"minItems": 1,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"controllerName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
"type": "string"
}
},
"required": [
"ancestorRef",
"conditions",
"controllerName"
],
"type": "object"
},
"maxItems": 16,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"ancestors"
],
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
@@ -0,0 +1,321 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"options": {
"additionalProperties": {
"maxLength": 4096,
"minLength": 0,
"type": "string"
},
"maxProperties": 16,
"type": "object"
},
"targetRefs": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"sectionName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic",
"x-kubernetes-validations": [
{
"message": "sectionName must be specified when targetRefs includes 2 or more references to the same target",
"rule": "self.all(p1, self.all(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name ? ((!has(p1.sectionName) || p1.sectionName == '') == (!has(p2.sectionName) || p2.sectionName == '')) : true))"
},
{
"message": "sectionName must be unique when targetRefs includes 2 or more references to the same target",
"rule": "self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || (has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName))))"
}
]
},
"validation": {
"properties": {
"caCertificateRefs": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"hostname": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"subjectAltNames": {
"items": {
"properties": {
"hostname": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"type": {
"enum": [
"Hostname",
"URI"
],
"type": "string"
},
"uri": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(([^:/?#]+):)(//([^/?#]*))([^?#]*)(\\?([^#]*))?(#(.*))?",
"type": "string"
}
},
"required": [
"type"
],
"type": "object",
"x-kubernetes-validations": [
{
"message": "SubjectAltName element must contain Hostname, if Type is set to Hostname",
"rule": "!(self.type == \"Hostname\" && (!has(self.hostname) || self.hostname == \"\"))"
},
{
"message": "SubjectAltName element must not contain Hostname, if Type is not set to Hostname",
"rule": "!(self.type != \"Hostname\" && has(self.hostname) && self.hostname != \"\")"
},
{
"message": "SubjectAltName element must contain URI, if Type is set to URI",
"rule": "!(self.type == \"URI\" && (!has(self.uri) || self.uri == \"\"))"
},
{
"message": "SubjectAltName element must not contain URI, if Type is not set to URI",
"rule": "!(self.type != \"URI\" && has(self.uri) && self.uri != \"\")"
}
]
},
"maxItems": 5,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"wellKnownCACertificates": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(System|([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]))$",
"type": "string"
}
},
"required": [
"hostname"
],
"type": "object",
"x-kubernetes-validations": [
{
"message": "must not contain both CACertificateRefs and WellKnownCACertificates",
"rule": "!(has(self.caCertificateRefs) && size(self.caCertificateRefs) > 0 && has(self.wellKnownCACertificates) && self.wellKnownCACertificates != \"\")"
},
{
"message": "must specify either CACertificateRefs or WellKnownCACertificates",
"rule": "(has(self.caCertificateRefs) && size(self.caCertificateRefs) > 0 || has(self.wellKnownCACertificates) && self.wellKnownCACertificates != \"\")"
}
]
}
},
"required": [
"targetRefs",
"validation"
],
"type": "object"
},
"status": {
"properties": {
"ancestors": {
"items": {
"properties": {
"ancestorRef": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Gateway",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"sectionName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"minItems": 1,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"controllerName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
"type": "string"
}
},
"required": [
"ancestorRef",
"conditions",
"controllerName"
],
"type": "object"
},
"maxItems": 16,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"ancestors"
],
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
@@ -0,0 +1,916 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"addresses": {
"items": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"IPAddress"
]
},
"value": {
"anyOf": [
{
"format": "ipv4"
},
{
"format": "ipv6"
}
]
}
}
},
{
"properties": {
"type": {
"not": {
"enum": [
"IPAddress"
]
}
}
}
}
],
"properties": {
"type": {
"default": "IPAddress",
"maxLength": 253,
"minLength": 1,
"pattern": "^Hostname|IPAddress|NamedAddress|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
"type": "string"
},
"value": {
"maxLength": 253,
"type": "string"
}
},
"type": "object",
"x-kubernetes-validations": [
{
"message": "Hostname value must be empty or contain only valid characters (matching ^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$)",
"rule": "self.type == 'Hostname' ? (!has(self.value) || self.value.matches(r\"\"\"^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$\"\"\")): true"
}
]
},
"maxItems": 16,
"type": "array",
"x-kubernetes-list-type": "atomic",
"x-kubernetes-validations": [
{
"message": "IPAddress values must be unique",
"rule": "self.all(a1, a1.type == 'IPAddress' && has(a1.value) ? self.exists_one(a2, a2.type == a1.type && has(a2.value) && a2.value == a1.value) : true )"
},
{
"message": "Hostname values must be unique",
"rule": "self.all(a1, a1.type == 'Hostname' && has(a1.value) ? self.exists_one(a2, a2.type == a1.type && has(a2.value) && a2.value == a1.value) : true )"
}
]
},
"allowedListeners": {
"properties": {
"namespaces": {
"default": {
"from": "None"
},
"properties": {
"from": {
"default": "None",
"enum": [
"All",
"Selector",
"Same",
"None"
],
"type": "string"
},
"selector": {
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string"
},
"values": {
"items": {
"type": "string"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"key",
"operator"
],
"type": "object"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"matchLabels": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object",
"x-kubernetes-map-type": "atomic"
}
},
"type": "object"
}
},
"type": "object"
},
"gatewayClassName": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"infrastructure": {
"properties": {
"annotations": {
"additionalProperties": {
"maxLength": 4096,
"minLength": 0,
"type": "string"
},
"maxProperties": 8,
"type": "object",
"x-kubernetes-validations": [
{
"message": "Annotation keys must be in the form of an optional DNS subdomain prefix followed by a required name segment of up to 63 characters.",
"rule": "self.all(key, key.matches(r\"\"\"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$\"\"\"))"
},
{
"message": "If specified, the annotation key's prefix must be a DNS subdomain not longer than 253 characters in total.",
"rule": "self.all(key, key.split(\"/\")[0].size() < 253)"
}
]
},
"labels": {
"additionalProperties": {
"maxLength": 63,
"minLength": 0,
"pattern": "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$",
"type": "string"
},
"maxProperties": 8,
"type": "object",
"x-kubernetes-validations": [
{
"message": "Label keys must be in the form of an optional DNS subdomain prefix followed by a required name segment of up to 63 characters.",
"rule": "self.all(key, key.matches(r\"\"\"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$\"\"\"))"
},
{
"message": "If specified, the label key's prefix must be a DNS subdomain not longer than 253 characters in total.",
"rule": "self.all(key, key.split(\"/\")[0].size() < 253)"
}
]
},
"parametersRef": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
}
},
"type": "object"
},
"listeners": {
"items": {
"properties": {
"allowedRoutes": {
"default": {
"namespaces": {
"from": "Same"
}
},
"properties": {
"kinds": {
"items": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"namespaces": {
"default": {
"from": "Same"
},
"properties": {
"from": {
"default": "Same",
"enum": [
"All",
"Selector",
"Same"
],
"type": "string"
},
"selector": {
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string"
},
"values": {
"items": {
"type": "string"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"key",
"operator"
],
"type": "object"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"matchLabels": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object",
"x-kubernetes-map-type": "atomic"
}
},
"type": "object"
}
},
"type": "object"
},
"hostname": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"protocol": {
"maxLength": 255,
"minLength": 1,
"pattern": "^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9]+$",
"type": "string"
},
"tls": {
"properties": {
"certificateRefs": {
"items": {
"properties": {
"group": {
"default": "",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Secret",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"maxItems": 64,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"mode": {
"default": "Terminate",
"enum": [
"Terminate",
"Passthrough"
],
"type": "string"
},
"options": {
"additionalProperties": {
"maxLength": 4096,
"minLength": 0,
"type": "string"
},
"maxProperties": 16,
"type": "object"
}
},
"type": "object",
"x-kubernetes-validations": [
{
"message": "certificateRefs or options must be specified when mode is Terminate",
"rule": "self.mode == 'Terminate' ? size(self.certificateRefs) > 0 || size(self.options) > 0 : true"
}
]
}
},
"required": [
"name",
"port",
"protocol"
],
"type": "object"
},
"maxItems": 64,
"minItems": 1,
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map",
"x-kubernetes-validations": [
{
"message": "tls must not be specified for protocols ['HTTP', 'TCP', 'UDP']",
"rule": "self.all(l, l.protocol in ['HTTP', 'TCP', 'UDP'] ? !has(l.tls) : true)"
},
{
"message": "tls mode must be Terminate for protocol HTTPS",
"rule": "self.all(l, (l.protocol == 'HTTPS' && has(l.tls)) ? (l.tls.mode == '' || l.tls.mode == 'Terminate') : true)"
},
{
"message": "tls mode must be set for protocol TLS",
"rule": "self.all(l, (l.protocol == 'TLS' ? has(l.tls) && has(l.tls.mode) && l.tls.mode != '' : true))"
},
{
"message": "hostname must not be specified for protocols ['TCP', 'UDP']",
"rule": "self.all(l, l.protocol in ['TCP', 'UDP'] ? (!has(l.hostname) || l.hostname == '') : true)"
},
{
"message": "Listener name must be unique within the Gateway",
"rule": "self.all(l1, self.exists_one(l2, l1.name == l2.name))"
},
{
"message": "Combination of port, protocol and hostname must be unique for each listener",
"rule": "self.all(l1, self.exists_one(l2, l1.port == l2.port && l1.protocol == l2.protocol && (has(l1.hostname) && has(l2.hostname) ? l1.hostname == l2.hostname : !has(l1.hostname) && !has(l2.hostname))))"
}
]
},
"tls": {
"properties": {
"backend": {
"properties": {
"clientCertificateRef": {
"properties": {
"group": {
"default": "",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Secret",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
},
"type": "object"
},
"frontend": {
"properties": {
"default": {
"properties": {
"validation": {
"properties": {
"caCertificateRefs": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
},
"maxItems": 8,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"mode": {
"default": "AllowValidOnly",
"enum": [
"AllowValidOnly",
"AllowInsecureFallback"
],
"type": "string"
}
},
"required": [
"caCertificateRefs"
],
"type": "object"
}
},
"type": "object"
},
"perPort": {
"items": {
"properties": {
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"tls": {
"properties": {
"validation": {
"properties": {
"caCertificateRefs": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
},
"maxItems": 8,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"mode": {
"default": "AllowValidOnly",
"enum": [
"AllowValidOnly",
"AllowInsecureFallback"
],
"type": "string"
}
},
"required": [
"caCertificateRefs"
],
"type": "object"
}
},
"type": "object"
}
},
"required": [
"port",
"tls"
],
"type": "object"
},
"maxItems": 64,
"type": "array",
"x-kubernetes-list-map-keys": [
"port"
],
"x-kubernetes-list-type": "map",
"x-kubernetes-validations": [
{
"message": "Port for TLS configuration must be unique within the Gateway",
"rule": "self.all(t1, self.exists_one(t2, t1.port == t2.port))"
}
]
}
},
"required": [
"default"
],
"type": "object"
}
},
"type": "object"
}
},
"required": [
"gatewayClassName",
"listeners"
],
"type": "object"
},
"status": {
"default": {
"conditions": [
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Accepted"
},
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Programmed"
}
]
},
"properties": {
"addresses": {
"items": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"IPAddress"
]
},
"value": {
"anyOf": [
{
"format": "ipv4"
},
{
"format": "ipv6"
}
]
}
}
},
{
"properties": {
"type": {
"not": {
"enum": [
"IPAddress"
]
}
}
}
}
],
"properties": {
"type": {
"default": "IPAddress",
"maxLength": 253,
"minLength": 1,
"pattern": "^Hostname|IPAddress|NamedAddress|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
"type": "string"
},
"value": {
"maxLength": 253,
"minLength": 1,
"type": "string"
}
},
"required": [
"value"
],
"type": "object",
"x-kubernetes-validations": [
{
"message": "Hostname value must only contain valid characters (matching ^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$)",
"rule": "self.type == 'Hostname' ? self.value.matches(r\"\"\"^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$\"\"\"): true"
}
]
},
"maxItems": 16,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"attachedListenerSets": {
"format": "int32",
"type": "integer"
},
"conditions": {
"default": [
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Accepted"
},
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Programmed"
}
],
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"listeners": {
"items": {
"properties": {
"attachedRoutes": {
"format": "int32",
"type": "integer"
},
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"name": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"supportedKinds": {
"items": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"attachedRoutes",
"conditions",
"name"
],
"type": "object"
},
"maxItems": 64,
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map"
}
},
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
@@ -0,0 +1,916 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"addresses": {
"items": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"IPAddress"
]
},
"value": {
"anyOf": [
{
"format": "ipv4"
},
{
"format": "ipv6"
}
]
}
}
},
{
"properties": {
"type": {
"not": {
"enum": [
"IPAddress"
]
}
}
}
}
],
"properties": {
"type": {
"default": "IPAddress",
"maxLength": 253,
"minLength": 1,
"pattern": "^Hostname|IPAddress|NamedAddress|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
"type": "string"
},
"value": {
"maxLength": 253,
"type": "string"
}
},
"type": "object",
"x-kubernetes-validations": [
{
"message": "Hostname value must be empty or contain only valid characters (matching ^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$)",
"rule": "self.type == 'Hostname' ? (!has(self.value) || self.value.matches(r\"\"\"^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$\"\"\")): true"
}
]
},
"maxItems": 16,
"type": "array",
"x-kubernetes-list-type": "atomic",
"x-kubernetes-validations": [
{
"message": "IPAddress values must be unique",
"rule": "self.all(a1, a1.type == 'IPAddress' && has(a1.value) ? self.exists_one(a2, a2.type == a1.type && has(a2.value) && a2.value == a1.value) : true )"
},
{
"message": "Hostname values must be unique",
"rule": "self.all(a1, a1.type == 'Hostname' && has(a1.value) ? self.exists_one(a2, a2.type == a1.type && has(a2.value) && a2.value == a1.value) : true )"
}
]
},
"allowedListeners": {
"properties": {
"namespaces": {
"default": {
"from": "None"
},
"properties": {
"from": {
"default": "None",
"enum": [
"All",
"Selector",
"Same",
"None"
],
"type": "string"
},
"selector": {
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string"
},
"values": {
"items": {
"type": "string"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"key",
"operator"
],
"type": "object"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"matchLabels": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object",
"x-kubernetes-map-type": "atomic"
}
},
"type": "object"
}
},
"type": "object"
},
"gatewayClassName": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"infrastructure": {
"properties": {
"annotations": {
"additionalProperties": {
"maxLength": 4096,
"minLength": 0,
"type": "string"
},
"maxProperties": 8,
"type": "object",
"x-kubernetes-validations": [
{
"message": "Annotation keys must be in the form of an optional DNS subdomain prefix followed by a required name segment of up to 63 characters.",
"rule": "self.all(key, key.matches(r\"\"\"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$\"\"\"))"
},
{
"message": "If specified, the annotation key's prefix must be a DNS subdomain not longer than 253 characters in total.",
"rule": "self.all(key, key.split(\"/\")[0].size() < 253)"
}
]
},
"labels": {
"additionalProperties": {
"maxLength": 63,
"minLength": 0,
"pattern": "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$",
"type": "string"
},
"maxProperties": 8,
"type": "object",
"x-kubernetes-validations": [
{
"message": "Label keys must be in the form of an optional DNS subdomain prefix followed by a required name segment of up to 63 characters.",
"rule": "self.all(key, key.matches(r\"\"\"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$\"\"\"))"
},
{
"message": "If specified, the label key's prefix must be a DNS subdomain not longer than 253 characters in total.",
"rule": "self.all(key, key.split(\"/\")[0].size() < 253)"
}
]
},
"parametersRef": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
}
},
"type": "object"
},
"listeners": {
"items": {
"properties": {
"allowedRoutes": {
"default": {
"namespaces": {
"from": "Same"
}
},
"properties": {
"kinds": {
"items": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"namespaces": {
"default": {
"from": "Same"
},
"properties": {
"from": {
"default": "Same",
"enum": [
"All",
"Selector",
"Same"
],
"type": "string"
},
"selector": {
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string"
},
"values": {
"items": {
"type": "string"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"key",
"operator"
],
"type": "object"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"matchLabels": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object",
"x-kubernetes-map-type": "atomic"
}
},
"type": "object"
}
},
"type": "object"
},
"hostname": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"protocol": {
"maxLength": 255,
"minLength": 1,
"pattern": "^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9]+$",
"type": "string"
},
"tls": {
"properties": {
"certificateRefs": {
"items": {
"properties": {
"group": {
"default": "",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Secret",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"maxItems": 64,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"mode": {
"default": "Terminate",
"enum": [
"Terminate",
"Passthrough"
],
"type": "string"
},
"options": {
"additionalProperties": {
"maxLength": 4096,
"minLength": 0,
"type": "string"
},
"maxProperties": 16,
"type": "object"
}
},
"type": "object",
"x-kubernetes-validations": [
{
"message": "certificateRefs or options must be specified when mode is Terminate",
"rule": "self.mode == 'Terminate' ? size(self.certificateRefs) > 0 || size(self.options) > 0 : true"
}
]
}
},
"required": [
"name",
"port",
"protocol"
],
"type": "object"
},
"maxItems": 64,
"minItems": 1,
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map",
"x-kubernetes-validations": [
{
"message": "tls must not be specified for protocols ['HTTP', 'TCP', 'UDP']",
"rule": "self.all(l, l.protocol in ['HTTP', 'TCP', 'UDP'] ? !has(l.tls) : true)"
},
{
"message": "tls mode must be Terminate for protocol HTTPS",
"rule": "self.all(l, (l.protocol == 'HTTPS' && has(l.tls)) ? (l.tls.mode == '' || l.tls.mode == 'Terminate') : true)"
},
{
"message": "tls mode must be set for protocol TLS",
"rule": "self.all(l, (l.protocol == 'TLS' ? has(l.tls) && has(l.tls.mode) && l.tls.mode != '' : true))"
},
{
"message": "hostname must not be specified for protocols ['TCP', 'UDP']",
"rule": "self.all(l, l.protocol in ['TCP', 'UDP'] ? (!has(l.hostname) || l.hostname == '') : true)"
},
{
"message": "Listener name must be unique within the Gateway",
"rule": "self.all(l1, self.exists_one(l2, l1.name == l2.name))"
},
{
"message": "Combination of port, protocol and hostname must be unique for each listener",
"rule": "self.all(l1, self.exists_one(l2, l1.port == l2.port && l1.protocol == l2.protocol && (has(l1.hostname) && has(l2.hostname) ? l1.hostname == l2.hostname : !has(l1.hostname) && !has(l2.hostname))))"
}
]
},
"tls": {
"properties": {
"backend": {
"properties": {
"clientCertificateRef": {
"properties": {
"group": {
"default": "",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Secret",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
},
"type": "object"
},
"frontend": {
"properties": {
"default": {
"properties": {
"validation": {
"properties": {
"caCertificateRefs": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
},
"maxItems": 8,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"mode": {
"default": "AllowValidOnly",
"enum": [
"AllowValidOnly",
"AllowInsecureFallback"
],
"type": "string"
}
},
"required": [
"caCertificateRefs"
],
"type": "object"
}
},
"type": "object"
},
"perPort": {
"items": {
"properties": {
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"tls": {
"properties": {
"validation": {
"properties": {
"caCertificateRefs": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
},
"maxItems": 8,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"mode": {
"default": "AllowValidOnly",
"enum": [
"AllowValidOnly",
"AllowInsecureFallback"
],
"type": "string"
}
},
"required": [
"caCertificateRefs"
],
"type": "object"
}
},
"type": "object"
}
},
"required": [
"port",
"tls"
],
"type": "object"
},
"maxItems": 64,
"type": "array",
"x-kubernetes-list-map-keys": [
"port"
],
"x-kubernetes-list-type": "map",
"x-kubernetes-validations": [
{
"message": "Port for TLS configuration must be unique within the Gateway",
"rule": "self.all(t1, self.exists_one(t2, t1.port == t2.port))"
}
]
}
},
"required": [
"default"
],
"type": "object"
}
},
"type": "object"
}
},
"required": [
"gatewayClassName",
"listeners"
],
"type": "object"
},
"status": {
"default": {
"conditions": [
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Accepted"
},
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Programmed"
}
]
},
"properties": {
"addresses": {
"items": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"IPAddress"
]
},
"value": {
"anyOf": [
{
"format": "ipv4"
},
{
"format": "ipv6"
}
]
}
}
},
{
"properties": {
"type": {
"not": {
"enum": [
"IPAddress"
]
}
}
}
}
],
"properties": {
"type": {
"default": "IPAddress",
"maxLength": 253,
"minLength": 1,
"pattern": "^Hostname|IPAddress|NamedAddress|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
"type": "string"
},
"value": {
"maxLength": 253,
"minLength": 1,
"type": "string"
}
},
"required": [
"value"
],
"type": "object",
"x-kubernetes-validations": [
{
"message": "Hostname value must only contain valid characters (matching ^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$)",
"rule": "self.type == 'Hostname' ? self.value.matches(r\"\"\"^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$\"\"\"): true"
}
]
},
"maxItems": 16,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"attachedListenerSets": {
"format": "int32",
"type": "integer"
},
"conditions": {
"default": [
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Accepted"
},
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Programmed"
}
],
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"listeners": {
"items": {
"properties": {
"attachedRoutes": {
"format": "int32",
"type": "integer"
},
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"name": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"supportedKinds": {
"items": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"attachedRoutes",
"conditions",
"name"
],
"type": "object"
},
"maxItems": 64,
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map"
}
},
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
@@ -0,0 +1,166 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"controllerName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
"type": "string",
"x-kubernetes-validations": [
{
"message": "Value is immutable",
"rule": "self == oldSelf"
}
]
},
"parametersRef": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
}
},
"required": [
"controllerName"
],
"type": "object"
},
"status": {
"default": {
"conditions": [
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Accepted"
}
]
},
"properties": {
"conditions": {
"default": [
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Accepted"
}
],
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"supportedFeatures": {
"items": {
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"maxItems": 64,
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map"
}
},
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
@@ -0,0 +1,166 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"controllerName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
"type": "string",
"x-kubernetes-validations": [
{
"message": "Value is immutable",
"rule": "self == oldSelf"
}
]
},
"parametersRef": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"group",
"kind",
"name"
],
"type": "object"
}
},
"required": [
"controllerName"
],
"type": "object"
},
"status": {
"default": {
"conditions": [
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Accepted"
}
]
},
"properties": {
"conditions": {
"default": [
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Accepted"
}
],
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"supportedFeatures": {
"items": {
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"maxItems": 64,
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map"
}
},
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,479 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"listeners": {
"items": {
"properties": {
"allowedRoutes": {
"default": {
"namespaces": {
"from": "Same"
}
},
"properties": {
"kinds": {
"items": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"namespaces": {
"default": {
"from": "Same"
},
"properties": {
"from": {
"default": "Same",
"enum": [
"All",
"Selector",
"Same"
],
"type": "string"
},
"selector": {
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string"
},
"values": {
"items": {
"type": "string"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"key",
"operator"
],
"type": "object"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"matchLabels": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object",
"x-kubernetes-map-type": "atomic"
}
},
"type": "object"
}
},
"type": "object"
},
"hostname": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"protocol": {
"maxLength": 255,
"minLength": 1,
"pattern": "^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9]+$",
"type": "string"
},
"tls": {
"properties": {
"certificateRefs": {
"items": {
"properties": {
"group": {
"default": "",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Secret",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"maxItems": 64,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"mode": {
"default": "Terminate",
"enum": [
"Terminate",
"Passthrough"
],
"type": "string"
},
"options": {
"additionalProperties": {
"maxLength": 4096,
"minLength": 0,
"type": "string"
},
"maxProperties": 16,
"type": "object"
}
},
"type": "object",
"x-kubernetes-validations": [
{
"message": "certificateRefs or options must be specified when mode is Terminate",
"rule": "self.mode == 'Terminate' ? size(self.certificateRefs) > 0 || size(self.options) > 0 : true"
}
]
}
},
"required": [
"name",
"port",
"protocol"
],
"type": "object"
},
"maxItems": 64,
"minItems": 1,
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map",
"x-kubernetes-validations": [
{
"message": "tls must not be specified for protocols ['HTTP', 'TCP', 'UDP']",
"rule": "self.all(l, l.protocol in ['HTTP', 'TCP', 'UDP'] ? !has(l.tls) : true)"
},
{
"message": "tls mode must be Terminate for protocol HTTPS",
"rule": "self.all(l, (l.protocol == 'HTTPS' && has(l.tls)) ? (l.tls.mode == '' || l.tls.mode == 'Terminate') : true)"
},
{
"message": "tls mode must be set for protocol TLS",
"rule": "self.all(l, (l.protocol == 'TLS' ? has(l.tls) && has(l.tls.mode) && l.tls.mode != '' : true))"
},
{
"message": "hostname must not be specified for protocols ['TCP', 'UDP']",
"rule": "self.all(l, l.protocol in ['TCP', 'UDP'] ? (!has(l.hostname) || l.hostname == '') : true)"
},
{
"message": "Listener name must be unique within the Gateway",
"rule": "self.all(l1, self.exists_one(l2, l1.name == l2.name))"
},
{
"message": "Combination of port, protocol and hostname must be unique for each listener",
"rule": "self.all(l1, !has(l1.port) || self.exists_one(l2, has(l2.port) && l1.port == l2.port && l1.protocol == l2.protocol && (has(l1.hostname) && has(l2.hostname) ? l1.hostname == l2.hostname : !has(l1.hostname) && !has(l2.hostname))))"
}
]
},
"parentRef": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Gateway",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
},
"required": [
"listeners",
"parentRef"
],
"type": "object"
},
"status": {
"default": {
"conditions": [
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Accepted"
},
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Programmed"
}
]
},
"properties": {
"conditions": {
"default": [
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Accepted"
},
{
"lastTransitionTime": "1970-01-01T00:00:00Z",
"message": "Waiting for controller",
"reason": "Pending",
"status": "Unknown",
"type": "Programmed"
}
],
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"listeners": {
"items": {
"properties": {
"attachedRoutes": {
"format": "int32",
"type": "integer"
},
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"name": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"supportedKinds": {
"items": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"maxItems": 8,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"attachedRoutes",
"conditions",
"name"
],
"type": "object"
},
"maxItems": 64,
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map"
}
},
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
@@ -0,0 +1,88 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"from": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"group",
"kind",
"namespace"
],
"type": "object"
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"to": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
}
},
"required": [
"group",
"kind"
],
"type": "object"
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"from",
"to"
],
"type": "object"
}
},
"type": "object"
}
@@ -0,0 +1,88 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"from": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
}
},
"required": [
"group",
"kind",
"namespace"
],
"type": "object"
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"to": {
"items": {
"properties": {
"group": {
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
}
},
"required": [
"group",
"kind"
],
"type": "object"
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"from",
"to"
],
"type": "object"
}
},
"type": "object"
}
@@ -0,0 +1,315 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"hostnames": {
"items": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic",
"x-kubernetes-validations": [
{
"message": "Hostnames cannot contain an IP",
"rule": "self.all(h, !isIP(h))"
},
{
"message": "Hostnames must be valid based on RFC-1123",
"rule": "self.all(h, !h.contains('*') ? h.matches('^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$') : true)"
},
{
"message": "Wildcards on hostnames must be the first label, and the rest of hostname must be valid based on RFC-1123",
"rule": "self.all(h, h.contains('*') ? (h.startsWith('*.') && h.substring(2).matches('^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$')) : true)"
}
]
},
"parentRefs": {
"items": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Gateway",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"sectionName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"maxItems": 32,
"type": "array",
"x-kubernetes-list-type": "atomic",
"x-kubernetes-validations": [
{
"message": "sectionName must be specified when parentRefs includes 2 or more references to the same parent",
"rule": "self.all(p1, self.all(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) ? ((!has(p1.sectionName) || p1.sectionName == '') == (!has(p2.sectionName) || p2.sectionName == '')) : true))"
},
{
"message": "sectionName must be unique when parentRefs includes 2 or more references to the same parent",
"rule": "self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || (has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName))))"
}
]
},
"rules": {
"items": {
"properties": {
"backendRefs": {
"items": {
"properties": {
"group": {
"default": "",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Service",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"weight": {
"default": 1,
"format": "int32",
"maximum": 1000000,
"minimum": 0,
"type": "integer"
}
},
"required": [
"name"
],
"type": "object",
"x-kubernetes-validations": [
{
"message": "Must have port for Service reference",
"rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
}
]
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"name": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"backendRefs"
],
"type": "object"
},
"maxItems": 1,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"hostnames",
"rules"
],
"type": "object"
},
"status": {
"properties": {
"parents": {
"items": {
"properties": {
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"minItems": 1,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"controllerName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
"type": "string"
},
"parentRef": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Gateway",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"sectionName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
},
"required": [
"conditions",
"controllerName",
"parentRef"
],
"type": "object"
},
"maxItems": 32,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"parents"
],
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
@@ -0,0 +1,299 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"hostnames": {
"items": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"maxItems": 16,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"parentRefs": {
"items": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Gateway",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"sectionName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"maxItems": 32,
"type": "array",
"x-kubernetes-list-type": "atomic",
"x-kubernetes-validations": [
{
"message": "sectionName must be specified when parentRefs includes 2 or more references to the same parent",
"rule": "self.all(p1, self.all(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) ? ((!has(p1.sectionName) || p1.sectionName == '') == (!has(p2.sectionName) || p2.sectionName == '')) : true))"
},
{
"message": "sectionName must be unique when parentRefs includes 2 or more references to the same parent",
"rule": "self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || (has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName))))"
}
]
},
"rules": {
"items": {
"properties": {
"backendRefs": {
"items": {
"properties": {
"group": {
"default": "",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Service",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"weight": {
"default": 1,
"format": "int32",
"maximum": 1000000,
"minimum": 0,
"type": "integer"
}
},
"required": [
"name"
],
"type": "object",
"x-kubernetes-validations": [
{
"message": "Must have port for Service reference",
"rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
}
]
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"name": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"backendRefs"
],
"type": "object"
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"rules"
],
"type": "object"
},
"status": {
"properties": {
"parents": {
"items": {
"properties": {
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"minItems": 1,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"controllerName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
"type": "string"
},
"parentRef": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Gateway",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"sectionName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
},
"required": [
"conditions",
"controllerName",
"parentRef"
],
"type": "object"
},
"maxItems": 32,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"parents"
],
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
@@ -0,0 +1,315 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"hostnames": {
"items": {
"maxLength": 253,
"minLength": 1,
"pattern": "^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic",
"x-kubernetes-validations": [
{
"message": "Hostnames cannot contain an IP",
"rule": "self.all(h, !isIP(h))"
},
{
"message": "Hostnames must be valid based on RFC-1123",
"rule": "self.all(h, !h.contains('*') ? h.matches('^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$') : true)"
},
{
"message": "Wildcards on hostnames must be the first label, and the rest of hostname must be valid based on RFC-1123",
"rule": "self.all(h, h.contains('*') ? (h.startsWith('*.') && h.substring(2).matches('^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$')) : true)"
}
]
},
"parentRefs": {
"items": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Gateway",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"sectionName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"maxItems": 32,
"type": "array",
"x-kubernetes-list-type": "atomic",
"x-kubernetes-validations": [
{
"message": "sectionName must be specified when parentRefs includes 2 or more references to the same parent",
"rule": "self.all(p1, self.all(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) ? ((!has(p1.sectionName) || p1.sectionName == '') == (!has(p2.sectionName) || p2.sectionName == '')) : true))"
},
{
"message": "sectionName must be unique when parentRefs includes 2 or more references to the same parent",
"rule": "self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || (has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName))))"
}
]
},
"rules": {
"items": {
"properties": {
"backendRefs": {
"items": {
"properties": {
"group": {
"default": "",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Service",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"weight": {
"default": 1,
"format": "int32",
"maximum": 1000000,
"minimum": 0,
"type": "integer"
}
},
"required": [
"name"
],
"type": "object",
"x-kubernetes-validations": [
{
"message": "Must have port for Service reference",
"rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
}
]
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"name": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"backendRefs"
],
"type": "object"
},
"maxItems": 1,
"minItems": 1,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"hostnames",
"rules"
],
"type": "object"
},
"status": {
"properties": {
"parents": {
"items": {
"properties": {
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"maxItems": 8,
"minItems": 1,
"type": "array",
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map"
},
"controllerName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
"type": "string"
},
"parentRef": {
"properties": {
"group": {
"default": "gateway.networking.k8s.io",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"default": "Gateway",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"port": {
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"sectionName": {
"maxLength": 253,
"minLength": 1,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
},
"required": [
"conditions",
"controllerName",
"parentRef"
],
"type": "object"
},
"maxItems": 32,
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
"parents"
],
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}