Files
unkinben 784c3b5de1 Add JSON schema generation for kubeconform CRD validation (#212)
## Summary
- New `ci/generate-schemas.sh` script that generates JSON schemas from three sources:
  1. Live cluster CRDs via `kubectl get crds`
  2. Offline CRD manifests (ArgoCD v3.3.2, Gateway API v1.5.1)
  3. Kubernetes v1.33.7 swagger spec for native types
- Schemas follow Datree catalog convention (`<group>/<Kind>_<version>.json`)
- `validate-apps.sh` and `validate-clusters.sh` check local schemas first, falling back to remote
- Fixes TLSRoute (and other CRD) schema validation failures in kubeconform

## Sources
- ArgoCD: `artifactapi.../argoproj/argo-cd/refs/tags/v3.3.2/manifests/ha/install.yaml`
- Gateway API: `artifactapi.../kubernetes-sigs/gateway-api/releases/download/v1.5.1/standard-install.yaml`
- Kubernetes: `artifactapi.../kubernetes/kubernetes/refs/tags/v1.33.7/api/openapi-spec/swagger.json`

Reviewed-on: #212
Co-authored-by: Ben Vincent <ben@unkin.net>
Co-committed-by: Ben Vincent <ben@unkin.net>
2026-06-28 17:26:08 +10:00

178 lines
3.4 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"acceleratedNetworking": {
"default": false,
"type": "boolean"
},
"apiVersion": {
"type": "string"
},
"availabilitySet": {
"default": "docker-machine",
"nullable": true,
"type": "string"
},
"availabilityZone": {
"default": "",
"nullable": true,
"type": "string"
},
"clientId": {
"default": "",
"nullable": true,
"type": "string"
},
"clientSecret": {
"default": "",
"nullable": true,
"type": "string"
},
"customData": {
"default": "",
"nullable": true,
"type": "string"
},
"diskSize": {
"default": "30",
"nullable": true,
"type": "string"
},
"dns": {
"default": "",
"nullable": true,
"type": "string"
},
"dockerPort": {
"default": "2376",
"nullable": true,
"type": "string"
},
"enablePublicIpStandardSku": {
"default": false,
"type": "boolean"
},
"environment": {
"default": "AzurePublicCloud",
"nullable": true,
"type": "string"
},
"faultDomainCount": {
"default": "3",
"nullable": true,
"type": "string"
},
"image": {
"default": "canonical:ubuntu-24_04-lts:server-gen1:latest",
"nullable": true,
"type": "string"
},
"kind": {
"type": "string"
},
"location": {
"default": "westus",
"nullable": true,
"type": "string"
},
"managedDisks": {
"default": false,
"type": "boolean"
},
"metadata": {
"type": "object"
},
"noPublicIp": {
"default": false,
"type": "boolean"
},
"nsg": {
"default": "",
"nullable": true,
"type": "string"
},
"openPort": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
},
"plan": {
"default": "",
"nullable": true,
"type": "string"
},
"privateIpAddress": {
"default": "",
"nullable": true,
"type": "string"
},
"resourceGroup": {
"default": "docker-machine",
"nullable": true,
"type": "string"
},
"size": {
"default": "Standard_D2_v2",
"nullable": true,
"type": "string"
},
"sshUser": {
"default": "docker-user",
"nullable": true,
"type": "string"
},
"staticPublicIp": {
"default": false,
"type": "boolean"
},
"storageType": {
"default": "Standard_LRS",
"nullable": true,
"type": "string"
},
"subnet": {
"default": "docker-machine",
"nullable": true,
"type": "string"
},
"subnetPrefix": {
"default": "192.168.0.0/16",
"nullable": true,
"type": "string"
},
"subscriptionId": {
"default": "",
"nullable": true,
"type": "string"
},
"tags": {
"default": "",
"nullable": true,
"type": "string"
},
"tenantId": {
"default": "",
"nullable": true,
"type": "string"
},
"updateDomainCount": {
"default": "5",
"nullable": true,
"type": "string"
},
"usePrivateIp": {
"default": false,
"type": "boolean"
},
"vnet": {
"default": "docker-machine-vnet",
"nullable": true,
"type": "string"
}
},
"type": "object"
}