From 528ef0e6c5f542ff04ae86be3284bf7616a8d3bb Mon Sep 17 00:00:00 2001 From: Przemyslaw Roguski Date: Wed, 5 Aug 2026 17:46:34 +0200 Subject: [PATCH] feat: add ocp_versions to pattern metadata schema Add schema definitions for the ocp_versions section used by the validate_ocp_version role in rhvp.cluster_utils to check cluster compatibility before pattern installation. Signed-off-by: Przemyslaw Roguski Co-authored-by: Cursor --- pattern.schema.json | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/pattern.schema.json b/pattern.schema.json index 7b82fc0..a34d433 100644 --- a/pattern.schema.json +++ b/pattern.schema.json @@ -144,6 +144,9 @@ "description": "URL or path to a logo image for the pattern", "format": "uri" }, + "ocp_versions": { + "$ref": "#/$defs/ocpVersions" + }, "variants": { "type": "array", "description": "Deployment variants for the pattern", @@ -219,6 +222,42 @@ "description": "Human-readable description of the variant" } } + }, + "ocpVersions": { + "type": "object", + "description": "OCP version compatibility requirements checked by the validate_ocp_version role during installation", + "additionalProperties": false, + "properties": { + "minimum": { + "type": "string", + "description": "Minimum supported OCP version (e.g. 4.20). Versions below this trigger a warning.", + "pattern": "^[0-9]+\\.[0-9]+$" + }, + "unsupported": { + "type": "array", + "description": "Explicitly unsupported OCP versions that cause a hard fail during installation", + "items": { + "$ref": "#/$defs/unsupportedOcpVersion" + } + } + } + }, + "unsupportedOcpVersion": { + "type": "object", + "description": "An OCP version that is explicitly not supported", + "required": ["version", "reason"], + "additionalProperties": false, + "properties": { + "version": { + "type": "string", + "description": "OCP version string (e.g. 4.23)", + "pattern": "^[0-9]+\\.[0-9]+$" + }, + "reason": { + "type": "string", + "description": "Human-readable explanation of why this version is unsupported" + } + } } } }