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

210 lines
3.9 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"accessKey": {
"default": "",
"nullable": true,
"type": "string"
},
"ami": {
"default": "",
"nullable": true,
"type": "string"
},
"apiVersion": {
"type": "string"
},
"blockDurationMinutes": {
"default": "0",
"nullable": true,
"type": "string"
},
"deviceName": {
"default": "",
"nullable": true,
"type": "string"
},
"enablePrimaryIpv6": {
"default": false,
"type": "boolean"
},
"encryptEbsVolume": {
"default": false,
"type": "boolean"
},
"endpoint": {
"default": "",
"nullable": true,
"type": "string"
},
"httpEndpoint": {
"default": "",
"nullable": true,
"type": "string"
},
"httpProtocolIpv6": {
"default": "disabled",
"nullable": true,
"type": "string"
},
"httpTokens": {
"default": "",
"nullable": true,
"type": "string"
},
"iamInstanceProfile": {
"default": "",
"nullable": true,
"type": "string"
},
"insecureTransport": {
"default": false,
"type": "boolean"
},
"instanceType": {
"default": "t2.micro",
"nullable": true,
"type": "string"
},
"ipv6AddressCount": {
"default": "0",
"nullable": true,
"type": "string"
},
"ipv6AddressOnly": {
"default": false,
"type": "boolean"
},
"keypairName": {
"default": "",
"nullable": true,
"type": "string"
},
"kind": {
"type": "string"
},
"kmsKey": {
"default": "",
"nullable": true,
"type": "string"
},
"metadata": {
"type": "object"
},
"monitoring": {
"default": false,
"type": "boolean"
},
"openPort": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
},
"privateAddressOnly": {
"default": false,
"type": "boolean"
},
"region": {
"default": "us-east-1",
"nullable": true,
"type": "string"
},
"requestSpotInstance": {
"default": false,
"type": "boolean"
},
"retries": {
"default": "5",
"nullable": true,
"type": "string"
},
"rootSize": {
"default": "16",
"nullable": true,
"type": "string"
},
"secretKey": {
"default": "",
"nullable": true,
"type": "string"
},
"securityGroup": {
"default": [
"rancher-nodes"
],
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
},
"securityGroupReadonly": {
"default": false,
"type": "boolean"
},
"sessionToken": {
"default": "",
"nullable": true,
"type": "string"
},
"spotPrice": {
"default": "0.50",
"nullable": true,
"type": "string"
},
"sshKeyContents": {
"default": "",
"nullable": true,
"type": "string"
},
"sshUser": {
"default": "ubuntu",
"nullable": true,
"type": "string"
},
"subnetId": {
"default": "",
"nullable": true,
"type": "string"
},
"tags": {
"default": "",
"nullable": true,
"type": "string"
},
"useEbsOptimizedInstance": {
"default": false,
"type": "boolean"
},
"usePrivateAddress": {
"default": false,
"type": "boolean"
},
"userdata": {
"default": "",
"nullable": true,
"type": "string"
},
"volumeType": {
"default": "gp2",
"nullable": true,
"type": "string"
},
"vpcId": {
"default": "",
"nullable": true,
"type": "string"
},
"zone": {
"default": "a",
"nullable": true,
"type": "string"
}
},
"type": "object"
}