Files
argocd-apps/schemas/fleet.cattle.io/gitrepo_v1alpha1.json
T
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

633 lines
17 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"branch": {
"nullable": true,
"type": "string"
},
"bundles": {
"items": {
"properties": {
"base": {
"type": "string"
},
"options": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"caBundle": {
"format": "byte",
"nullable": true,
"type": "string"
},
"clientSecretName": {
"nullable": true,
"type": "string"
},
"correctDrift": {
"properties": {
"enabled": {
"type": "boolean"
},
"force": {
"type": "boolean"
},
"keepFailHistory": {
"type": "boolean"
}
},
"type": "object"
},
"deleteNamespace": {
"type": "boolean"
},
"disablePolling": {
"type": "boolean"
},
"forceSyncGeneration": {
"format": "int64",
"type": "integer"
},
"helmRepoURLRegex": {
"nullable": true,
"type": "string"
},
"helmSecretName": {
"nullable": true,
"type": "string"
},
"helmSecretNameForPaths": {
"nullable": true,
"type": "string"
},
"imageScanCommit": {
"properties": {
"authorEmail": {
"type": "string"
},
"authorName": {
"type": "string"
},
"messageTemplate": {
"type": "string"
}
},
"type": "object"
},
"imageScanInterval": {
"type": "string"
},
"insecureSkipTLSVerify": {
"type": "boolean"
},
"keepResources": {
"type": "boolean"
},
"ociRegistrySecret": {
"type": "string"
},
"paths": {
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
},
"paused": {
"type": "boolean"
},
"pollingInterval": {
"nullable": true,
"type": "string"
},
"repo": {
"minLength": 1,
"type": "string"
},
"revision": {
"nullable": true,
"type": "string"
},
"serviceAccount": {
"nullable": true,
"type": "string"
},
"targetNamespace": {
"nullable": true,
"type": "string"
},
"targets": {
"items": {
"properties": {
"clusterGroup": {
"nullable": true,
"type": "string"
},
"clusterGroupSelector": {
"nullable": true,
"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"
},
"clusterName": {
"nullable": true,
"type": "string"
},
"clusterSelector": {
"nullable": true,
"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"
},
"name": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"webhookSecret": {
"type": "string"
}
},
"required": [
"repo"
],
"type": "object"
},
"status": {
"properties": {
"commit": {
"type": "string"
},
"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"
},
"desiredReadyClusters": {
"type": "integer"
},
"display": {
"properties": {
"error": {
"type": "boolean"
},
"message": {
"type": "string"
},
"readyBundleDeployments": {
"type": "string"
},
"state": {
"type": "string"
}
},
"type": "object"
},
"gitJobStatus": {
"type": "string"
},
"lastPollingTriggered": {
"format": "date-time",
"type": "string"
},
"lastSyncedImageScanTime": {
"format": "date-time",
"type": "string"
},
"observedGeneration": {
"format": "int64",
"type": "integer"
},
"perClusterResourceCounts": {
"additionalProperties": {
"properties": {
"desiredReady": {
"type": "integer"
},
"missing": {
"type": "integer"
},
"modified": {
"type": "integer"
},
"notReady": {
"type": "integer"
},
"orphaned": {
"type": "integer"
},
"ready": {
"type": "integer"
},
"unknown": {
"type": "integer"
},
"waitApplied": {
"type": "integer"
}
},
"type": "object"
},
"type": "object"
},
"pollingCommit": {
"type": "string"
},
"readyClusters": {
"type": "integer"
},
"resourceCounts": {
"properties": {
"desiredReady": {
"type": "integer"
},
"missing": {
"type": "integer"
},
"modified": {
"type": "integer"
},
"notReady": {
"type": "integer"
},
"orphaned": {
"type": "integer"
},
"ready": {
"type": "integer"
},
"unknown": {
"type": "integer"
},
"waitApplied": {
"type": "integer"
}
},
"type": "object"
},
"resources": {
"items": {
"properties": {
"apiVersion": {
"nullable": true,
"type": "string"
},
"error": {
"type": "boolean"
},
"id": {
"nullable": true,
"type": "string"
},
"incompleteState": {
"type": "boolean"
},
"kind": {
"nullable": true,
"type": "string"
},
"message": {
"nullable": true,
"type": "string"
},
"name": {
"nullable": true,
"type": "string"
},
"namespace": {
"nullable": true,
"type": "string"
},
"perClusterState": {
"nullable": true,
"properties": {
"missing": {
"items": {
"type": "string"
},
"type": "array"
},
"modified": {
"items": {
"type": "string"
},
"type": "array"
},
"notReady": {
"items": {
"type": "string"
},
"type": "array"
},
"orphaned": {
"items": {
"type": "string"
},
"type": "array"
},
"pending": {
"items": {
"type": "string"
},
"type": "array"
},
"ready": {
"items": {
"type": "string"
},
"type": "array"
},
"unknown": {
"items": {
"type": "string"
},
"type": "array"
},
"waitApplied": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"state": {
"type": "string"
},
"transitioning": {
"type": "boolean"
},
"type": {
"type": "string"
}
},
"required": [
"perClusterState"
],
"type": "object"
},
"type": "array"
},
"summary": {
"properties": {
"desiredReady": {
"type": "integer"
},
"errApplied": {
"type": "integer"
},
"modified": {
"type": "integer"
},
"nonReadyResources": {
"items": {
"properties": {
"bundleState": {
"nullable": true,
"type": "string"
},
"message": {
"nullable": true,
"type": "string"
},
"modifiedStatus": {
"items": {
"properties": {
"apiVersion": {
"nullable": true,
"type": "string"
},
"delete": {
"type": "boolean"
},
"exist": {
"type": "boolean"
},
"kind": {
"nullable": true,
"type": "string"
},
"missing": {
"type": "boolean"
},
"name": {
"nullable": true,
"type": "string"
},
"namespace": {
"nullable": true,
"type": "string"
},
"patch": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"name": {
"nullable": true,
"type": "string"
},
"nonReadyStatus": {
"items": {
"properties": {
"apiVersion": {
"nullable": true,
"type": "string"
},
"kind": {
"nullable": true,
"type": "string"
},
"name": {
"nullable": true,
"type": "string"
},
"namespace": {
"nullable": true,
"type": "string"
},
"summary": {
"properties": {
"error": {
"type": "boolean"
},
"message": {
"items": {
"type": "string"
},
"type": "array"
},
"state": {
"type": "string"
},
"transitioning": {
"type": "boolean"
}
},
"type": "object"
},
"uid": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"notReady": {
"type": "integer"
},
"outOfSync": {
"type": "integer"
},
"pending": {
"type": "integer"
},
"ready": {
"type": "integer"
},
"waitApplied": {
"type": "integer"
}
},
"type": "object"
},
"updateGeneration": {
"format": "int64",
"type": "integer"
},
"webhookCommit": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}