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

- ci/generate-schemas.sh generates schemas from CRD manifests and K8s swagger
- Sources: ArgoCD v3.3.2, Gateway API v1.5.1, Kubernetes v1.33.7
- Optionally fetches live cluster CRDs via kubectl when available
- Generated schemas committed to schemas/ for CI use
- Run `make schemas` to regenerate after CRD version bumps
- 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 d497db04be
565 changed files with 150486 additions and 2 deletions
@@ -0,0 +1,89 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"providerID": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"status": {
"properties": {
"addresses": {
"items": {
"properties": {
"address": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"type": {
"enum": [
"Hostname",
"ExternalIP",
"InternalIP",
"ExternalDNS",
"InternalDNS"
],
"type": "string"
}
},
"required": [
"address",
"type"
],
"type": "object"
},
"type": "array"
},
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"type": "string"
},
"lastUpdateTime": {
"type": "string"
},
"message": {
"type": "string"
},
"reason": {
"type": "string"
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"status",
"type"
],
"type": "object"
},
"type": "array"
},
"ready": {
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object"
}
@@ -0,0 +1,98 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"snapshotFile": {
"properties": {
"createdAt": {
"format": "date-time",
"type": "string"
},
"location": {
"type": "string"
},
"message": {
"type": "string"
},
"metadata": {
"type": "string"
},
"name": {
"type": "string"
},
"nodeName": {
"type": "string"
},
"s3": {
"properties": {
"bucket": {
"maxLength": 63,
"nullable": true,
"type": "string"
},
"cloudCredentialName": {
"nullable": true,
"type": "string"
},
"endpoint": {
"nullable": true,
"type": "string"
},
"endpointCA": {
"nullable": true,
"type": "string"
},
"folder": {
"nullable": true,
"type": "string"
},
"region": {
"nullable": true,
"type": "string"
},
"skipSSLVerify": {
"type": "boolean"
}
},
"type": "object"
},
"size": {
"format": "int64",
"type": "integer"
},
"status": {
"type": "string"
}
},
"type": "object"
},
"spec": {
"properties": {
"clusterName": {
"type": "string"
}
},
"type": "object"
},
"status": {
"properties": {
"missing": {
"type": "boolean"
}
},
"required": [
"missing"
],
"type": "object"
}
},
"type": "object"
}
@@ -0,0 +1,39 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"clusterName": {
"type": "string"
}
},
"type": "object"
},
"status": {
"properties": {
"dataSecretName": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"ready": {
"type": "boolean"
}
},
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
@@ -0,0 +1,93 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"clusterName": {
"type": "string"
},
"template": {
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"properties": {
"annotations": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"finalizers": {
"items": {
"type": "string"
},
"type": "array"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"name": {
"type": "string"
},
"namespace": {
"type": "string"
}
},
"type": "object"
},
"spec": {
"properties": {
"clusterName": {
"type": "string"
}
},
"type": "object"
},
"status": {
"properties": {
"dataSecretName": {
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"ready": {
"type": "boolean"
}
},
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
},
"required": [
"template"
],
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
+78
View File
@@ -0,0 +1,78 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"controlPlaneEndpoint": {
"properties": {
"host": {
"maxLength": 512,
"type": "string"
},
"port": {
"format": "int32",
"type": "integer"
}
},
"required": [
"host",
"port"
],
"type": "object"
}
},
"type": "object"
},
"status": {
"properties": {
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"type": "string"
},
"lastUpdateTime": {
"type": "string"
},
"message": {
"type": "string"
},
"reason": {
"type": "string"
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"status",
"type"
],
"type": "object"
},
"type": "array"
},
"ready": {
"type": "boolean"
}
},
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}
File diff suppressed because it is too large Load Diff