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>
382 lines
8.5 KiB
JSON
382 lines
8.5 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"properties": {
|
|
"apiVersion": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"type": "object"
|
|
},
|
|
"spec": {
|
|
"properties": {
|
|
"cluster": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"method": {
|
|
"default": "barmanObjectStore",
|
|
"enum": [
|
|
"barmanObjectStore",
|
|
"volumeSnapshot",
|
|
"plugin"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"online": {
|
|
"type": "boolean"
|
|
},
|
|
"onlineConfiguration": {
|
|
"properties": {
|
|
"immediateCheckpoint": {
|
|
"type": "boolean"
|
|
},
|
|
"waitForArchive": {
|
|
"default": true,
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"pluginConfiguration": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parameters": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"target": {
|
|
"enum": [
|
|
"primary",
|
|
"prefer-standby"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"cluster"
|
|
],
|
|
"type": "object",
|
|
"x-kubernetes-validations": [
|
|
{
|
|
"message": "BackupSpec is immutable once set",
|
|
"rule": "oldSelf == self"
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"properties": {
|
|
"azureCredentials": {
|
|
"properties": {
|
|
"connectionString": {
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"key",
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"inheritFromAzureAD": {
|
|
"type": "boolean"
|
|
},
|
|
"storageAccount": {
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"key",
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"storageKey": {
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"key",
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"storageSasToken": {
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"key",
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"backupId": {
|
|
"type": "string"
|
|
},
|
|
"backupLabelFile": {
|
|
"format": "byte",
|
|
"type": "string"
|
|
},
|
|
"backupName": {
|
|
"type": "string"
|
|
},
|
|
"beginLSN": {
|
|
"type": "string"
|
|
},
|
|
"beginWal": {
|
|
"type": "string"
|
|
},
|
|
"commandError": {
|
|
"type": "string"
|
|
},
|
|
"commandOutput": {
|
|
"type": "string"
|
|
},
|
|
"destinationPath": {
|
|
"type": "string"
|
|
},
|
|
"encryption": {
|
|
"type": "string"
|
|
},
|
|
"endLSN": {
|
|
"type": "string"
|
|
},
|
|
"endWal": {
|
|
"type": "string"
|
|
},
|
|
"endpointCA": {
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"key",
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"endpointURL": {
|
|
"type": "string"
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"googleCredentials": {
|
|
"properties": {
|
|
"applicationCredentials": {
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"key",
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"gkeEnvironment": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"instanceID": {
|
|
"properties": {
|
|
"ContainerID": {
|
|
"type": "string"
|
|
},
|
|
"podName": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"majorVersion": {
|
|
"type": "integer"
|
|
},
|
|
"method": {
|
|
"type": "string"
|
|
},
|
|
"online": {
|
|
"type": "boolean"
|
|
},
|
|
"phase": {
|
|
"type": "string"
|
|
},
|
|
"pluginMetadata": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"type": "object"
|
|
},
|
|
"s3Credentials": {
|
|
"properties": {
|
|
"accessKeyId": {
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"key",
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"inheritFromIAMRole": {
|
|
"type": "boolean"
|
|
},
|
|
"region": {
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"key",
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"secretAccessKey": {
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"key",
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"sessionToken": {
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"key",
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"serverName": {
|
|
"type": "string"
|
|
},
|
|
"snapshotBackupStatus": {
|
|
"properties": {
|
|
"elements": {
|
|
"items": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"tablespaceName": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"type"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"startedAt": {
|
|
"format": "date-time",
|
|
"type": "string"
|
|
},
|
|
"stoppedAt": {
|
|
"format": "date-time",
|
|
"type": "string"
|
|
},
|
|
"tablespaceMapFile": {
|
|
"format": "byte",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"metadata",
|
|
"spec"
|
|
],
|
|
"type": "object"
|
|
}
|