Files
argocd-apps/schemas/upgrade.cattle.io/plan_v1.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

971 lines
29 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"channel": {
"nullable": true,
"type": "string"
},
"concurrency": {
"type": "integer"
},
"cordon": {
"type": "boolean"
},
"drain": {
"nullable": true,
"properties": {
"deleteEmptydirData": {
"nullable": true,
"type": "boolean"
},
"deleteLocalData": {
"nullable": true,
"type": "boolean"
},
"disableEviction": {
"type": "boolean"
},
"force": {
"type": "boolean"
},
"gracePeriod": {
"nullable": true,
"type": "integer"
},
"ignoreDaemonSets": {
"nullable": true,
"type": "boolean"
},
"podSelector": {
"nullable": true,
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"nullable": true,
"type": "string"
},
"operator": {
"nullable": true,
"type": "string"
},
"values": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"matchLabels": {
"additionalProperties": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "object"
}
},
"type": "object"
},
"skipWaitForDeleteTimeout": {
"type": "integer"
},
"timeout": {
"nullable": true,
"x-kubernetes-int-or-string": true
}
},
"type": "object"
},
"exclusive": {
"type": "boolean"
},
"imagePullSecrets": {
"items": {
"properties": {
"name": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"jobActiveDeadlineSecs": {
"nullable": true,
"type": "integer"
},
"nodeSelector": {
"nullable": true,
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"nullable": true,
"type": "string"
},
"operator": {
"nullable": true,
"type": "string"
},
"values": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"matchLabels": {
"additionalProperties": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "object"
}
},
"type": "object"
},
"postCompleteDelay": {
"nullable": true,
"type": "string"
},
"prepare": {
"nullable": true,
"properties": {
"args": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
},
"command": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
},
"envFrom": {
"items": {
"properties": {
"configMapRef": {
"nullable": true,
"properties": {
"name": {
"nullable": true,
"type": "string"
},
"optional": {
"nullable": true,
"type": "boolean"
}
},
"type": "object"
},
"prefix": {
"nullable": true,
"type": "string"
},
"secretRef": {
"nullable": true,
"properties": {
"name": {
"nullable": true,
"type": "string"
},
"optional": {
"nullable": true,
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"envs": {
"items": {
"properties": {
"name": {
"nullable": true,
"type": "string"
},
"value": {
"nullable": true,
"type": "string"
},
"valueFrom": {
"nullable": true,
"properties": {
"configMapKeyRef": {
"nullable": true,
"properties": {
"key": {
"nullable": true,
"type": "string"
},
"name": {
"nullable": true,
"type": "string"
},
"optional": {
"nullable": true,
"type": "boolean"
}
},
"type": "object"
},
"fieldRef": {
"nullable": true,
"properties": {
"apiVersion": {
"nullable": true,
"type": "string"
},
"fieldPath": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"fileKeyRef": {
"nullable": true,
"properties": {
"key": {
"nullable": true,
"type": "string"
},
"optional": {
"nullable": true,
"type": "boolean"
},
"path": {
"nullable": true,
"type": "string"
},
"volumeName": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"resourceFieldRef": {
"nullable": true,
"properties": {
"containerName": {
"nullable": true,
"type": "string"
},
"divisor": {
"nullable": true,
"type": "string"
},
"resource": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"secretKeyRef": {
"nullable": true,
"properties": {
"key": {
"nullable": true,
"type": "string"
},
"name": {
"nullable": true,
"type": "string"
},
"optional": {
"nullable": true,
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"image": {
"nullable": true,
"type": "string"
},
"securityContext": {
"nullable": true,
"properties": {
"allowPrivilegeEscalation": {
"nullable": true,
"type": "boolean"
},
"appArmorProfile": {
"nullable": true,
"properties": {
"localhostProfile": {
"nullable": true,
"type": "string"
},
"type": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"capabilities": {
"nullable": true,
"properties": {
"add": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
},
"drop": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
}
},
"type": "object"
},
"privileged": {
"nullable": true,
"type": "boolean"
},
"procMount": {
"nullable": true,
"type": "string"
},
"readOnlyRootFilesystem": {
"nullable": true,
"type": "boolean"
},
"runAsGroup": {
"nullable": true,
"type": "integer"
},
"runAsNonRoot": {
"nullable": true,
"type": "boolean"
},
"runAsUser": {
"nullable": true,
"type": "integer"
},
"seLinuxOptions": {
"nullable": true,
"properties": {
"level": {
"nullable": true,
"type": "string"
},
"role": {
"nullable": true,
"type": "string"
},
"type": {
"nullable": true,
"type": "string"
},
"user": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"seccompProfile": {
"nullable": true,
"properties": {
"localhostProfile": {
"nullable": true,
"type": "string"
},
"type": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"windowsOptions": {
"nullable": true,
"properties": {
"gmsaCredentialSpec": {
"nullable": true,
"type": "string"
},
"gmsaCredentialSpecName": {
"nullable": true,
"type": "string"
},
"hostProcess": {
"nullable": true,
"type": "boolean"
},
"runAsUserName": {
"nullable": true,
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"volumes": {
"items": {
"properties": {
"destination": {
"nullable": true,
"type": "string"
},
"name": {
"nullable": true,
"type": "string"
},
"source": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
}
},
"type": "object"
},
"priorityClassName": {
"nullable": true,
"type": "string"
},
"secrets": {
"items": {
"properties": {
"defaultMode": {
"nullable": true,
"type": "integer"
},
"ignoreUpdates": {
"type": "boolean"
},
"name": {
"nullable": true,
"type": "string"
},
"path": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"serviceAccountName": {
"nullable": true,
"type": "string"
},
"tolerations": {
"items": {
"properties": {
"effect": {
"nullable": true,
"type": "string"
},
"key": {
"nullable": true,
"type": "string"
},
"operator": {
"nullable": true,
"type": "string"
},
"tolerationSeconds": {
"nullable": true,
"type": "integer"
},
"value": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"upgrade": {
"nullable": true,
"properties": {
"args": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
},
"command": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
},
"envFrom": {
"items": {
"properties": {
"configMapRef": {
"nullable": true,
"properties": {
"name": {
"nullable": true,
"type": "string"
},
"optional": {
"nullable": true,
"type": "boolean"
}
},
"type": "object"
},
"prefix": {
"nullable": true,
"type": "string"
},
"secretRef": {
"nullable": true,
"properties": {
"name": {
"nullable": true,
"type": "string"
},
"optional": {
"nullable": true,
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"envs": {
"items": {
"properties": {
"name": {
"nullable": true,
"type": "string"
},
"value": {
"nullable": true,
"type": "string"
},
"valueFrom": {
"nullable": true,
"properties": {
"configMapKeyRef": {
"nullable": true,
"properties": {
"key": {
"nullable": true,
"type": "string"
},
"name": {
"nullable": true,
"type": "string"
},
"optional": {
"nullable": true,
"type": "boolean"
}
},
"type": "object"
},
"fieldRef": {
"nullable": true,
"properties": {
"apiVersion": {
"nullable": true,
"type": "string"
},
"fieldPath": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"fileKeyRef": {
"nullable": true,
"properties": {
"key": {
"nullable": true,
"type": "string"
},
"optional": {
"nullable": true,
"type": "boolean"
},
"path": {
"nullable": true,
"type": "string"
},
"volumeName": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"resourceFieldRef": {
"nullable": true,
"properties": {
"containerName": {
"nullable": true,
"type": "string"
},
"divisor": {
"nullable": true,
"type": "string"
},
"resource": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"secretKeyRef": {
"nullable": true,
"properties": {
"key": {
"nullable": true,
"type": "string"
},
"name": {
"nullable": true,
"type": "string"
},
"optional": {
"nullable": true,
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"image": {
"nullable": true,
"type": "string"
},
"securityContext": {
"nullable": true,
"properties": {
"allowPrivilegeEscalation": {
"nullable": true,
"type": "boolean"
},
"appArmorProfile": {
"nullable": true,
"properties": {
"localhostProfile": {
"nullable": true,
"type": "string"
},
"type": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"capabilities": {
"nullable": true,
"properties": {
"add": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
},
"drop": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
}
},
"type": "object"
},
"privileged": {
"nullable": true,
"type": "boolean"
},
"procMount": {
"nullable": true,
"type": "string"
},
"readOnlyRootFilesystem": {
"nullable": true,
"type": "boolean"
},
"runAsGroup": {
"nullable": true,
"type": "integer"
},
"runAsNonRoot": {
"nullable": true,
"type": "boolean"
},
"runAsUser": {
"nullable": true,
"type": "integer"
},
"seLinuxOptions": {
"nullable": true,
"properties": {
"level": {
"nullable": true,
"type": "string"
},
"role": {
"nullable": true,
"type": "string"
},
"type": {
"nullable": true,
"type": "string"
},
"user": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"seccompProfile": {
"nullable": true,
"properties": {
"localhostProfile": {
"nullable": true,
"type": "string"
},
"type": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"windowsOptions": {
"nullable": true,
"properties": {
"gmsaCredentialSpec": {
"nullable": true,
"type": "string"
},
"gmsaCredentialSpecName": {
"nullable": true,
"type": "string"
},
"hostProcess": {
"nullable": true,
"type": "boolean"
},
"runAsUserName": {
"nullable": true,
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"volumes": {
"items": {
"properties": {
"destination": {
"nullable": true,
"type": "string"
},
"name": {
"nullable": true,
"type": "string"
},
"source": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
}
},
"type": "object"
},
"version": {
"nullable": true,
"type": "string"
},
"window": {
"nullable": true,
"properties": {
"days": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
},
"endTime": {
"nullable": true,
"type": "string"
},
"startTime": {
"nullable": true,
"type": "string"
},
"timeZone": {
"nullable": true,
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"status": {
"properties": {
"applying": {
"items": {
"nullable": true,
"type": "string"
},
"nullable": true,
"type": "array"
},
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"nullable": true,
"type": "string"
},
"lastUpdateTime": {
"nullable": true,
"type": "string"
},
"message": {
"nullable": true,
"type": "string"
},
"reason": {
"nullable": true,
"type": "string"
},
"status": {
"nullable": true,
"type": "string"
},
"type": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"nullable": true,
"type": "array"
},
"latestHash": {
"nullable": true,
"type": "string"
},
"latestVersion": {
"nullable": true,
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}