From 3adc66334795120c4651ee46a1758332cd8bef7e Mon Sep 17 00:00:00 2001 From: basa0425 Date: Fri, 19 Dec 2025 11:20:07 +0530 Subject: [PATCH 1/2] feat: migrate json schemas --- schemas/application.schema.json | 6 +- schemas/cloud.schema.json | 41 ++++- schemas/effectiveset_mapping.schema.json | 10 +- schemas/env-specific.schema.json | 58 +++++++ schemas/solution-descriptor.schema.json | 203 +++++++++++++++++++++++ 5 files changed, 311 insertions(+), 7 deletions(-) create mode 100644 schemas/env-specific.schema.json create mode 100644 schemas/solution-descriptor.schema.json diff --git a/schemas/application.schema.json b/schemas/application.schema.json index 7ada1fef4..b691d7d1b 100644 --- a/schemas/application.schema.json +++ b/schemas/application.schema.json @@ -19,8 +19,8 @@ "description": "A collection of key-value pairs specifying deployment (to manifest rendering) parameters", "examples": [ { - "param1": true, - "param2": "value2" + "MONITORING_ENABLED": true, + "ZOOKEEPER_URL": "zookeeper.zookeeper:2182" } ] }, @@ -41,4 +41,4 @@ "deployParameters", "technicalConfigurationParameters" ] -} +} \ No newline at end of file diff --git a/schemas/cloud.schema.json b/schemas/cloud.schema.json index 575d963c2..e5a8fe6a1 100644 --- a/schemas/cloud.schema.json +++ b/schemas/cloud.schema.json @@ -118,6 +118,43 @@ false ] }, + "profile": { + "type": [ + "object", + "null" + ], + "title": "Resource profile override", + "description": "Resource profile override for namespace. Can be not set", + "properties": { + "name": { + "type": [ + "string", + "null" + ], + "title": "Name of Resource Profile Override", + "description": "<> of Resource profile override", + "examples": [ + "dev_override_" + ] + }, + "baseline": { + "title": "Baseline of RPO", + "description": "Baseline name of Resource profile override", + "enum": [ + "dev", + "dev-ha", + "prod", + "prod-nonha" + ], + "examples": [ + "dev", + "dev-ha", + "prod", + "prod-nonha" + ] + } + } + }, "maasConfig": { "type": "object", "title": "MaaS Configuration", @@ -326,6 +363,8 @@ "name", "apiUrl", "apiPort", + "privateUrl", + "publicUrl", "dashboardUrl", "labels", "defaultCredentialsId", @@ -337,4 +376,4 @@ "vaultConfig", "consulConfig" ] -} +} \ No newline at end of file diff --git a/schemas/effectiveset_mapping.schema.json b/schemas/effectiveset_mapping.schema.json index c6598bf2c..4a1dd2dcb 100644 --- a/schemas/effectiveset_mapping.schema.json +++ b/schemas/effectiveset_mapping.schema.json @@ -1,7 +1,11 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", + "title": "Effective-set Mapping Schema", + "description": "The schema to define mapping of the effectiveset", "patternProperties": { - ".{1,}": { "type": "string" } + ".{1,}": { + "type": "string" + } } -} +} \ No newline at end of file diff --git a/schemas/env-specific.schema.json b/schemas/env-specific.schema.json new file mode 100644 index 000000000..1acec51b4 --- /dev/null +++ b/schemas/env-specific.schema.json @@ -0,0 +1,58 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Cloud Passport and Environment Specific Configuration", + "description": "Configuration for cloud passport and environment-specific settings, including whitelisted and blacklisted parameters.", + "type": "object", + "additionalProperties": true, + "properties": { + "cloudPassport": { + "$ref": "cloud-passport.schema.json" + }, + "envSpecific": { + "type": "object", + "description": "Environment-specific configurations", + "additionalProperties": true, + "properties": { + "whiteList": { + "type": "object", + "description": "List of allowed items", + "additionalProperties": true, + "properties": { + "cloud": { + "type": "array", + "description": "Allowed cloud environments" + }, + "namespaces": { + "type": "array", + "description": "Allowed namespaces" + } + } + }, + "blackList": { + "type": "object", + "description": "List of disallowed items", + "additionalProperties": true, + "properties": { + "deployParameters": { + "type": "array", + "description": "Disallowed deployment parameters" + }, + "e2eParameters": { + "type": "array", + "description": "Disallowed end-to-end parameters" + }, + "technicalConfigurationParameters": { + "type": "array", + "description": "Disallowed technical configuration parameters", + "default": [] + } + } + } + } + } + }, + "required": [ + "cloudPassport", + "envSpecific" + ] +} \ No newline at end of file diff --git a/schemas/solution-descriptor.schema.json b/schemas/solution-descriptor.schema.json new file mode 100644 index 000000000..914d506f1 --- /dev/null +++ b/schemas/solution-descriptor.schema.json @@ -0,0 +1,203 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Solution Descriptor", + "description": "Configuration for the cloud environment and its associated services", + "type": "object", + "additionalProperties": true, + "properties": { + "version": { + "title": "Configuration Version", + "description": "The version of the configuration file schema", + "type": ["number", "string"], + "enum": [ + "2.0", 2.0, + "2.1", 2.1, + "2.2", 2.2 + ], + "examples": [ + "2.0", + "2.1", + "2.2" + ] + }, + "type": { + "title": "Deployment Type", + "description": "Specifies the type of the deployment, such as 'deploy'", + "type": "string", + "examples": [ + "deploy" + ] + }, + "deployMode": { + "title": "Deployment Mode", + "description": "Mode of the deployment, e.g., 'composite' or 'sequential'", + "type": "string", + "examples": [ + "composite" + ] + }, + "applications": { + "title": "List of Applications", + "description": "A list of applications to be deployed, each with its version, deploy postfix, and alias", + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "version": { + "type": "string" + }, + "deployPostfix": { + "type": "string" + }, + "alias": { + "type": "string" + } + }, + "required": [ + "version", + "alias" + ] + }, + "examples": [ + { + "version": "MONITORING:0.64.1-delivery-20240506.063654-1-RELEASE", + "deployPostfix": "platform-monitoring", + "alias": "platform-monitoring/platform-monitoring-monitoring-sf" + }, + { + "version": "postgres:1.32.6-delivery_pg14-20240531.092603-2-RELEASE", + "deployPostfix": "postgresql", + "alias": "postgresql/postgresql-postgres" + } + ] + }, + "cmdbConfigs": { + "title": "CMDB Configurations", + "description": "Configuration details for CMDB", + "type": "array", + "examples": [ + "bssParamSet:release-7-3-6-20211111.122104-3-RELEASE" + ] + }, + "devopsTools": { + "title": "DevOps Tools", + "description": "List of DevOps tools used in deployment", + "type": "array", + "examples": [ + "Platform-Jenkins:release-2-311-1-20211117.135353-8-RELEASE" + ] + }, + "artifacts": { + "title": "Artifacts", + "description": "Different types of artifacts", + "type": "object", + "properties": { + "maven": { + "type": "array", + "items": { + "type": "object", + "properties": { + "repo": { "type": "string" }, + "artifacts": { + "type": "array", + "items": { "type": "string" } + } + } + } + }, + "raw": { + "type": "array", + "items": { + "type": "object", + "properties": { + "repo": { "type": "string" }, + "artifacts": { + "type": "array", + "items": { "type": "string" } + } + } + } + }, + "docker": { + "type": "array", + "items": { + "type": "object", + "properties": { + "registry": { "type": "string" }, + "images": { + "type": "array", + "items": { "type": "string" } + } + } + } + } + }, + "examples": [ + { + "maven": [ + { "repo": "pd.saas.mvn", "artifacts": ["com.qubership.smartplug:smartplug-annotation-processor:0.8.3"] } + ], + "raw": [ + { "repo": "https://artifactorycn.qubership.com/pd.sandbox.files", "artifacts": ["product/prod.billing.applications/event-aggregator/feature_account-for-open_20210705-082430/generic1.0/ea-model/public-model.zip"] } + ], + "docker": [ + { "registry": "artifactorycn.qubership.com:17084", "images": ["mongo:3.6.16"] } + ] + } + ] + }, + "dvm": { + "title": "DVM Configuration", + "description": "Configuration for DVM", + "type": "object", + "properties": { + "url": { "type": "string" } + }, + "required": ["url"], + "examples": [ + { "url": "/mnt/FTPCN_Corp/SandboxBS.Builds/Staging/internal/demo.platform.clouddevops/dvm-git/master_20200223-075212/generic1.0/paas-infra-dvm.tar.gz" } + ] + }, + "userData": { + "title": "User Data", + "description": "Any user-specific data", + "type": "object", + "additionalProperties": { "type": "string" }, + "examples": [ + { "myKey": "myValue" } + ] + } + }, + "deployGraph": { + "title": "Deployment Graph", + "type": "array", + "items": { + "type": "object", + "properties": { + "parallel": { "type": "boolean" }, + "chunkName": { "type": "string" }, + "apps": { + "type": "array", + "items": { "type": "string" } + } + }, + "required": ["chunkName", "apps"] + }, + "examples": [ + { + "parallel": false, + "chunkName": "sequentialChunk", + "apps": [ + "e2e-framework", + "deployer", + "dsl-processor", + "create-tenant", + "e2e-framework_1" + ] + } + ] + }, + "required": ["version", "type", "applications"] +} + From 6336443952c6b8ec409737f698847e13f92681bb Mon Sep 17 00:00:00 2001 From: basa0425 Date: Mon, 23 Feb 2026 09:43:16 +0530 Subject: [PATCH 2/2] feat: update env_definition schema file --- schemas/env-definition.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/env-definition.schema.json b/schemas/env-definition.schema.json index c23441bb1..7febd9a7f 100644 --- a/schemas/env-definition.schema.json +++ b/schemas/env-definition.schema.json @@ -143,7 +143,7 @@ "sharedTemplateVariables": { "type": "array", "title": "Shared Template Variables", - "description": "Array of file names in 'shared-template-variables' folders", + "description": "Array of file names in 'shared_template_variables' folders", "items": { "type": "string" },