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
|
||||
}
|
||||
}
|
||||
}
|
||||
54
schemas/derived-rail-v1.schema.json
Normal file
54
schemas/derived-rail-v1.schema.json
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://railiance.dev/schemas/derived-rail-v1.schema.json",
|
||||
"title": "Railiance derived rail declaration",
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"kind",
|
||||
"rail_id",
|
||||
"ownership_repo",
|
||||
"contract_version",
|
||||
"composition_kind",
|
||||
"base_rail",
|
||||
"base_rail_contract",
|
||||
"execution_architecture",
|
||||
"required_substrate_capabilities",
|
||||
"inherited_semantics",
|
||||
"overridden_semantics",
|
||||
"compatibility_constraints",
|
||||
"readiness_state"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {"const": "execution-rail"},
|
||||
"rail_id": {"type": "string", "pattern": "^rail-[a-z0-9-]+$"},
|
||||
"ownership_repo": {"type": "string"},
|
||||
"contract_version": {"type": "string"},
|
||||
"composition_kind": {"const": "derived"},
|
||||
"base_rail": {"const": "rail-kubernetes"},
|
||||
"base_rail_contract": {"const": "1.0.0"},
|
||||
"execution_architecture": {"type": "string"},
|
||||
"required_substrate_capabilities": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"type": "string"},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"inherited_semantics": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"type": "string"},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"overridden_semantics": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"type": "string"},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"compatibility_constraints": {"type": "array", "items": {"type": "string"}},
|
||||
"readiness_state": {
|
||||
"enum": ["declared", "installed", "verified", "production-approved", "deprecated"]
|
||||
}
|
||||
}
|
||||
}
|
||||
37
schemas/rail-binding-v1.schema.json
Normal file
37
schemas/rail-binding-v1.schema.json
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://railiance.dev/schemas/rail-binding-v1.schema.json",
|
||||
"title": "Railiance workload rail binding",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"rail_id",
|
||||
"rail_contract",
|
||||
"readiness_state",
|
||||
"required_substrate_capabilities",
|
||||
"deployment_artifacts",
|
||||
"rollout",
|
||||
"rollback"
|
||||
],
|
||||
"properties": {
|
||||
"rail_id": {"type": "string", "pattern": "^rail-[a-z0-9-]+$"},
|
||||
"rail_contract": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$"},
|
||||
"readiness_state": {
|
||||
"enum": ["declared", "installed", "verified", "production-approved", "deprecated"]
|
||||
},
|
||||
"required_substrate_capabilities": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"deployment_artifacts": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"type": "string"}
|
||||
},
|
||||
"scaling": {"type": "object"},
|
||||
"routing": {"type": "object"},
|
||||
"rollout": {"type": "object"},
|
||||
"rollback": {"type": "object"}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue