784c3b5de1
## 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>
403 lines
11 KiB
JSON
403 lines
11 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"properties": {
|
|
"apiVersion": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"type": "object"
|
|
},
|
|
"spec": {
|
|
"properties": {
|
|
"clusterName": {
|
|
"maxLength": 63,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
"failureDomains": {
|
|
"items": {
|
|
"maxLength": 256,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
"maxItems": 100,
|
|
"type": "array"
|
|
},
|
|
"minReadySeconds": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"providerIDList": {
|
|
"items": {
|
|
"maxLength": 512,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
"maxItems": 10000,
|
|
"type": "array"
|
|
},
|
|
"replicas": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"template": {
|
|
"properties": {
|
|
"metadata": {
|
|
"properties": {
|
|
"annotations": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"type": "object"
|
|
},
|
|
"labels": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"spec": {
|
|
"properties": {
|
|
"bootstrap": {
|
|
"properties": {
|
|
"configRef": {
|
|
"properties": {
|
|
"apiVersion": {
|
|
"type": "string"
|
|
},
|
|
"fieldPath": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"namespace": {
|
|
"type": "string"
|
|
},
|
|
"resourceVersion": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"x-kubernetes-map-type": "atomic"
|
|
},
|
|
"dataSecretName": {
|
|
"maxLength": 253,
|
|
"minLength": 0,
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"clusterName": {
|
|
"maxLength": 63,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
"failureDomain": {
|
|
"maxLength": 256,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
"infrastructureRef": {
|
|
"properties": {
|
|
"apiVersion": {
|
|
"type": "string"
|
|
},
|
|
"fieldPath": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"namespace": {
|
|
"type": "string"
|
|
},
|
|
"resourceVersion": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"x-kubernetes-map-type": "atomic"
|
|
},
|
|
"nodeDeletionTimeout": {
|
|
"type": "string"
|
|
},
|
|
"nodeDrainTimeout": {
|
|
"type": "string"
|
|
},
|
|
"nodeVolumeDetachTimeout": {
|
|
"type": "string"
|
|
},
|
|
"providerID": {
|
|
"maxLength": 512,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
"readinessGates": {
|
|
"items": {
|
|
"properties": {
|
|
"conditionType": {
|
|
"maxLength": 316,
|
|
"minLength": 1,
|
|
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
|
|
"type": "string"
|
|
},
|
|
"polarity": {
|
|
"enum": [
|
|
"Positive",
|
|
"Negative"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"conditionType"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"maxItems": 32,
|
|
"type": "array",
|
|
"x-kubernetes-list-map-keys": [
|
|
"conditionType"
|
|
],
|
|
"x-kubernetes-list-type": "map"
|
|
},
|
|
"version": {
|
|
"maxLength": 256,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"bootstrap",
|
|
"clusterName",
|
|
"infrastructureRef"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"clusterName",
|
|
"template"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"status": {
|
|
"properties": {
|
|
"availableReplicas": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"bootstrapReady": {
|
|
"type": "boolean"
|
|
},
|
|
"conditions": {
|
|
"items": {
|
|
"properties": {
|
|
"lastTransitionTime": {
|
|
"format": "date-time",
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"maxLength": 10240,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
"reason": {
|
|
"maxLength": 256,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
"severity": {
|
|
"maxLength": 32,
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"maxLength": 256,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"lastTransitionTime",
|
|
"status",
|
|
"type"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"failureMessage": {
|
|
"maxLength": 10240,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
"failureReason": {
|
|
"type": "string"
|
|
},
|
|
"infrastructureReady": {
|
|
"type": "boolean"
|
|
},
|
|
"nodeRefs": {
|
|
"items": {
|
|
"properties": {
|
|
"apiVersion": {
|
|
"type": "string"
|
|
},
|
|
"fieldPath": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"namespace": {
|
|
"type": "string"
|
|
},
|
|
"resourceVersion": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"x-kubernetes-map-type": "atomic"
|
|
},
|
|
"maxItems": 10000,
|
|
"type": "array"
|
|
},
|
|
"observedGeneration": {
|
|
"format": "int64",
|
|
"type": "integer"
|
|
},
|
|
"phase": {
|
|
"enum": [
|
|
"Pending",
|
|
"Provisioning",
|
|
"Provisioned",
|
|
"Running",
|
|
"ScalingUp",
|
|
"ScalingDown",
|
|
"Scaling",
|
|
"Deleting",
|
|
"Failed",
|
|
"Unknown"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"readyReplicas": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"replicas": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"unavailableReplicas": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"v1beta2": {
|
|
"properties": {
|
|
"availableReplicas": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"conditions": {
|
|
"items": {
|
|
"properties": {
|
|
"lastTransitionTime": {
|
|
"format": "date-time",
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"maxLength": 32768,
|
|
"type": "string"
|
|
},
|
|
"observedGeneration": {
|
|
"format": "int64",
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"reason": {
|
|
"maxLength": 1024,
|
|
"minLength": 1,
|
|
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"enum": [
|
|
"True",
|
|
"False",
|
|
"Unknown"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"maxLength": 316,
|
|
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"lastTransitionTime",
|
|
"message",
|
|
"reason",
|
|
"status",
|
|
"type"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"maxItems": 32,
|
|
"type": "array",
|
|
"x-kubernetes-list-map-keys": [
|
|
"type"
|
|
],
|
|
"x-kubernetes-list-type": "map"
|
|
},
|
|
"readyReplicas": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"upToDateReplicas": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|