diff --git a/src/com/mirantis/mk/KaasUtils.groovy b/src/com/mirantis/mk/KaasUtils.groovy
index eabda2f..ee72758 100644
--- a/src/com/mirantis/mk/KaasUtils.groovy
+++ b/src/com/mirantis/mk/KaasUtils.groovy
@@ -84,6 +84,7 @@
     def pauseForDebug = env.PAUSE_FOR_DEBUG ? env.PAUSE_FOR_DEBUG.toBoolean() : false
     def runChildMachineDeletionPolicyTest = env.RUN_CHILD_MACHINE_DELETION_POLICY_TEST ? env.RUN_CHILD_MACHINE_DELETION_POLICY_TEST.toBoolean() : false
     def runChildCustomCertTest = env.RUN_CHILD_CUSTOM_CERT_TEST ? env.RUN_CHILD_CUSTOM_CERT_TEST.toBoolean() : false
+    def runByoChildCustomCertTest = env.RUN_BYO_CHILD_CUSTOM_CERT_TEST ? env.RUN_BYO_CHILD_CUSTOM_CERT_TEST.toBoolean() : false
     // multiregion configuration from env variable: comma-separated string in form $mgmt_provider,$regional_provider
     def multiregionalMappings = env.MULTIREGION_SETUP ? multiregionWorkflowParser(env.MULTIREGION_SETUP) : [
         enabled: false,
@@ -331,6 +332,12 @@
         common.warningMsg('Child cluster deployment will be enabled since custom cert child test suite will be executed')
     }
 
+    if (commitMsg ==~ /(?s).*\[byo-child-custom-cert-test\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*byo-child-custom-cert-test\.*/) {
+        runByoChildCustomCertTest = true
+        attachBYO = true
+        common.warningMsg('Byo child cluster deployment will be enabled since custom cert child test suite will be executed')
+    }
+
     // TODO (vnaumov) remove below condition after moving all releases to UCP
     def ucpChildMatches = (commitMsg =~ /(\[child-ucp\s*ucp-.*?\])/)
     if (ucpChildMatches.size() > 0) {
@@ -467,6 +474,7 @@
         Delete child master node test: ${runChildDeleteMasterTest}
         Child machine deletion policy test: ${runChildMachineDeletionPolicyTest}
         Custom cert test for child clusters: ${runChildCustomCertTest}
+        Custom cert test for Byo child clusters: ${runByoChildCustomCertTest}
         AWS provider deployment scheduled: ${awsOnDemandDemo}
         Equinix provider deployment scheduled: ${equinixOnDemandDemo}
         EquinixmetalV2 provider deployment scheduled: ${equinixMetalV2OnDemandDemo}
@@ -521,6 +529,7 @@
         runRgnlDeleteMasterTestEnabled           : runRgnlDeleteMasterTest,
         runChildDeleteMasterTestEnabled          : runChildDeleteMasterTest,
         runChildCustomCertTestEnabled            : runChildCustomCertTest,
+        runByoChildCustomCertTestEnabled         : runByoChildCustomCertTest,
         runChildMachineDeletionPolicyTestEnabled : runChildMachineDeletionPolicyTest,
         runLMATestEnabled                        : runLMATest,
         runMgmtUserControllerTestEnabled         : runMgmtUserControllerTest,
@@ -828,6 +837,7 @@
         booleanParam(name: 'RUN_RGNL_DELETE_MASTER_TEST', value: triggers.runRgnlDeleteMasterTestEnabled),
         booleanParam(name: 'RUN_CHILD_DELETE_MASTER_TEST', value: triggers.runChildDeleteMasterTestEnabled),
         booleanParam(name: 'RUN_CHILD_CUSTOM_CERT_TEST', value: triggers.runChildCustomCertTestEnabled),
+        booleanParam(name: 'RUN_BYO_CHILD_CUSTOM_CERT_TEST', value: triggers.runByoChildCustomCertTestEnabled),
         booleanParam(name: 'RUN_CHILD_MACHINE_DELETION_POLICY_TEST', value: triggers.runChildMachineDeletionPolicyTestEnabled),
         booleanParam(name: 'RUN_LMA_TEST', value: triggers.runLMATestEnabled),
         booleanParam(name: 'RUN_MGMT_USER_CONTROLLER_TEST', value: triggers.runMgmtUserControllerTestEnabled),
diff --git a/src/com/mirantis/mk/ReleaseWorkflow.groovy b/src/com/mirantis/mk/ReleaseWorkflow.groovy
index 63a3675..a6ac966 100644
--- a/src/com/mirantis/mk/ReleaseWorkflow.groovy
+++ b/src/com/mirantis/mk/ReleaseWorkflow.groovy
@@ -110,7 +110,8 @@
     String changeAuthorName     = params.get('crAuthorName', 'MCP-CI')
     String changeAuthorEmail    = params.get('crAuthorEmail', 'mcp-ci-jenkins@ci.mcp.mirantis.net')
     Boolean valuesFromFile      = params.get('valuesFromFile', false)
-    Boolean catMetadataLog       = params.get('catMetadataLog', false)
+    Boolean catMetadataLog      = params.get('catMetadataLog', false)
+    Boolean validateOnce        = params.get('validateOnce', false)
 
     def cred = common.getCredentials(gitCredentialsId, 'key')
     String gerritUser = cred.username
@@ -166,15 +167,17 @@
                     }
                     try {
                         sh "metadata-app --path /workspace/metadata update --create --key '${keyArr[i]}' ${valueExpression}"
-                        checkResult = sh(script: "metadata-app --path /workspace/metadata validate --structure", returnStatus: true)
-                        def MetadataLogFile = readFile("metadata.log")
-                        if (MetadataLogFile.size() > 0) {
-                            if (catMetadataLog) {
-                                common.errorMsg("Invalid metadata structure, metadata.log file content:\n${MetadataLogFile}")
+                        if (!validateOnce) {
+                            def checkResult = sh(script: "metadata-app --path /workspace/metadata validate --structure", returnStatus: true)
+                            def MetadataLogFile = readFile("metadata.log")
+                            if (MetadataLogFile.size() > 0) {
+                                if (catMetadataLog) {
+                                    common.errorMsg("Invalid metadata structure, metadata.log file content:\n${MetadataLogFile}")
+                                }
                             }
-                        }
-                        if (checkResult != 0) {
-                            throw new Exception("Invalid metadata structure, see errors in the metadata.log file")
+                            if (checkResult != 0) {
+                                throw new Exception("Invalid metadata structure, see errors in the metadata.log file")
+                            }
                         }
                     } finally {
                         if (valuesFromFile) {
@@ -182,6 +185,18 @@
                         }
                     }
                 }
+                if (validateOnce) {
+                    def checkResult = sh(script: "metadata-app --path /workspace/metadata validate --structure", returnStatus: true)
+                    def MetadataLogFile = readFile("metadata.log")
+                    if (MetadataLogFile.size() > 0) {
+                        if (catMetadataLog) {
+                            common.errorMsg("Invalid metadata structure, metadata.log file content:\n${MetadataLogFile}")
+                        }
+                    }
+                    if (checkResult != 0) {
+                        throw new Exception("Invalid metadata structure, see errors in the metadata.log file")
+                    }
+                }
             }
         }
 
