Version the common and derived rail contract
This commit is contained in:
parent
fee395f0c4
commit
3ece1b55fb
8 changed files with 407 additions and 2 deletions
73
schemas/common-workload.schema.json
Normal file
73
schemas/common-workload.schema.json
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://railiance.dev/schemas/common-workload-v1.schema.json",
|
||||
"title": "Railiance common managed workload contract",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"contract_version",
|
||||
"workload_id",
|
||||
"ownership_repo",
|
||||
"criticality",
|
||||
"data_classification",
|
||||
"dependencies",
|
||||
"identity",
|
||||
"health",
|
||||
"recovery",
|
||||
"rail_bindings"
|
||||
],
|
||||
"properties": {
|
||||
"contract_version": {"const": "1.0.0"},
|
||||
"workload_id": {"type": "string", "pattern": "^[a-z][a-z0-9-]+$"},
|
||||
"ownership_repo": {"type": "string", "pattern": "^[a-z][a-z0-9-]+$"},
|
||||
"criticality": {
|
||||
"enum": ["low", "medium", "high", "critical"]
|
||||
},
|
||||
"data_classification": {
|
||||
"enum": ["public", "internal", "confidential", "restricted"]
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"identity": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["principal", "secret_references"],
|
||||
"properties": {
|
||||
"principal": {"type": "string", "minLength": 1},
|
||||
"tenant": {"type": "string", "minLength": 1},
|
||||
"secret_references": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"uniqueItems": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"health": {
|
||||
"type": "object",
|
||||
"required": ["readiness", "smoke"],
|
||||
"properties": {
|
||||
"readiness": {"type": "string", "minLength": 1},
|
||||
"smoke": {"type": "string", "minLength": 1},
|
||||
"audit": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"recovery": {
|
||||
"type": "object",
|
||||
"required": ["rollback"],
|
||||
"properties": {
|
||||
"rollback": {"type": "string", "minLength": 1},
|
||||
"rto": {"type": "string"},
|
||||
"rpo": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"rail_bindings": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "rail-binding-v1.schema.json"},
|
||||
"uniqueItems": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue