Files
argocd-apps/schemas/snapshot.storage.k8s.io/volumesnapshot_v1.json
T
unkinben 041016fc80
ci/woodpecker/pr/kubeconform Pipeline failed
ci/woodpecker/pr/pre-commit Pipeline was successful
Add JSON schema generation for kubeconform CRD validation
- ci/generate-schemas.sh extracts schemas from live cluster CRDs via kubectl
- Generated schemas committed to schemas/ for CI use
- Run `make schemas` to regenerate after CRD or K8s version changes
- validate-apps.sh and validate-clusters.sh check local schemas first
- Remove all kubeconform skip lists — all resource types now have schemas
2026-06-28 17:21:12 +10:00

108 lines
3.0 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"properties": {
"source": {
"properties": {
"persistentVolumeClaimName": {
"type": "string",
"x-kubernetes-validations": [
{
"message": "persistentVolumeClaimName is immutable",
"rule": "self == oldSelf"
}
]
},
"volumeSnapshotContentName": {
"type": "string",
"x-kubernetes-validations": [
{
"message": "volumeSnapshotContentName is immutable",
"rule": "self == oldSelf"
}
]
}
},
"type": "object",
"x-kubernetes-validations": [
{
"message": "persistentVolumeClaimName is required once set",
"rule": "!has(oldSelf.persistentVolumeClaimName) || has(self.persistentVolumeClaimName)"
},
{
"message": "volumeSnapshotContentName is required once set",
"rule": "!has(oldSelf.volumeSnapshotContentName) || has(self.volumeSnapshotContentName)"
},
{
"message": "exactly one of volumeSnapshotContentName and persistentVolumeClaimName must be set",
"rule": "(has(self.volumeSnapshotContentName) && !has(self.persistentVolumeClaimName)) || (!has(self.volumeSnapshotContentName) && has(self.persistentVolumeClaimName))"
}
]
},
"volumeSnapshotClassName": {
"type": "string",
"x-kubernetes-validations": [
{
"message": "volumeSnapshotClassName must not be the empty string when set",
"rule": "size(self) > 0"
}
]
}
},
"required": [
"source"
],
"type": "object"
},
"status": {
"properties": {
"boundVolumeSnapshotContentName": {
"type": "string"
},
"creationTime": {
"format": "date-time",
"type": "string"
},
"error": {
"properties": {
"message": {
"type": "string"
},
"time": {
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"readyToUse": {
"type": "boolean"
},
"restoreSize": {
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"type": "string",
"x-kubernetes-int-or-string": true
},
"volumeGroupSnapshotName": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"spec"
],
"type": "object"
}