Fix arc controller ns/name validation (#12525)

* Fix arc controller ns/name validation

* Rename control plane references

* Fix validation
This commit is contained in:
Charles Gagnon
2020-09-21 10:51:51 -07:00
committed by GitHub
parent 92a8147c8d
commit f9e9cc76ea
3 changed files with 94 additions and 94 deletions

View File

@@ -142,24 +142,24 @@
"providers": [
{
"notebookWizard": {
"notebook": "./notebooks/arcDeployment/deploy.arc.control.plane.ipynb",
"notebook": "./notebooks/arcDeployment/deploy.arc.data.controller.ipynb",
"type": "new-arc-control-plane",
"runNotebook": false,
"codeCellInsertionPosition": 5,
"actionText": "%deploy.arc.control.plane.action%",
"title": "%arc.control.plane.new.wizard.title%",
"name": "arc.control.plane.new.wizard",
"actionText": "%deploy.arc.data.controller.action%",
"title": "%arc.data.controller.new.wizard.title%",
"name": "arc.data.controller.new.wizard",
"labelPosition": "left",
"generateSummaryPage": false,
"pages": [
{
"title": "%arc.control.plane.select.cluster.title%",
"title": "%arc.data.controller.select.cluster.title%",
"sections": [
{
"fields": [
{
"type": "kube_cluster_context_picker",
"label": "%arc.control.plane.kube.cluster.context%",
"label": "%arc.data.controller.kube.cluster.context%",
"required": true,
"inputWidth": "350px",
"variableName": "AZDATA_NB_VAR_ARC_CLUSTER_CONTEXT",
@@ -170,13 +170,13 @@
]
},
{
"title": "%arc.control.plane.cluster.config.profile.title%",
"title": "%arc.data.controller.cluster.config.profile.title%",
"sections": [
{
"fields": [
{
"type": "options",
"label": "%arc.control.plane.cluster.config.profile%",
"label": "%arc.data.controller.cluster.config.profile%",
"required": true,
"variableName": "AZDATA_NB_VAR_ARC_PROFILE",
"editable": false,
@@ -199,14 +199,14 @@
]
},
{
"title": "%arc.control.plane.data.controller.create.title%",
"title": "%arc.data.controller.data.controller.create.title%",
"sections": [
{
"title": "%arc.control.plane.project.details.title%",
"title": "%arc.data.controller.project.details.title%",
"fields": [
{
"type": "readonly_text",
"label": "%arc.control.plane.project.details.description%",
"label": "%arc.data.controller.project.details.description%",
"labelWidth": "600px"
},
{
@@ -219,30 +219,30 @@
]
},
{
"title": "%arc.control.plane.data.controller.details.title%",
"title": "%arc.data.controller.data.controller.details.title%",
"fields": [
{
"type": "readonly_text",
"label": "%arc.control.plane.data.controller.details.description%",
"label": "%arc.data.controller.data.controller.details.description%",
"labelWidth": "600px"
},
{
"type": "text",
"label": "%arc.control.plane.arc.data.controller.namespace%",
"label": "%arc.data.controller.arc.data.controller.namespace%",
"textValidationRequired": true,
"textValidationRegex": "^[a-z0-9]([-a-z0-9]{0,11}[a-z0-9])?$",
"textValidationDescription": "%arc.control.plane.arc.data.controller.namespace.validation.description%",
"textValidationRegex": "^[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?$",
"textValidationDescription": "%arc.data.controller.arc.data.controller.namespace.validation.description%",
"defaultValue": "arc",
"required": true,
"variableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAMESPACE"
},
{
"type": "text",
"label": "%arc.control.plane.arc.data.controller.name%",
"label": "%arc.data.controller.arc.data.controller.name%",
"textValidationRequired": true,
"textValidationRegex": "^[a-z0-9]([-a-z0-9]{0,11}[a-z0-9])?$",
"textValidationDescription": "%arc.control.plane.arc.data.controller.name.validation.description%",
"defaultValue": "arc-cp1",
"textValidationRegex": "^[a-z0-9]([-.a-z0-9]{0,251}[a-z0-9])?$",
"textValidationDescription": "%arc.data.controller.arc.data.controller.name.validation.description%",
"defaultValue": "arc-dc",
"required": true,
"variableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAME"
},
@@ -255,7 +255,7 @@
},
{
"type": "azure_locations",
"label": "%arc.control.plane.arc.data.controller.location%",
"label": "%arc.data.controller.arc.data.controller.location%",
"defaultValue": "eastus",
"required": true,
"locationVariableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_LOCATION",
@@ -277,7 +277,7 @@
},
{
"type": "options",
"label": "%arc.control.plane.arc.data.controller.connectivity.mode%",
"label": "%arc.data.controller.arc.data.controller.connectivity.mode%",
"options": {
"values": [
"Indirect",
@@ -293,10 +293,10 @@
]
},
{
"title": "%arc.control.plane.admin.account.title%",
"title": "%arc.data.controller.admin.account.title%",
"fields": [
{
"label": "%arc.control.plane.admin.account.name%",
"label": "%arc.data.controller.admin.account.name%",
"variableName": "AZDATA_NB_VAR_ARC_ADMIN_USERNAME",
"type": "text",
"required": true,
@@ -304,12 +304,12 @@
"enabled": true
},
{
"label": "%arc.control.plane.admin.account.password%",
"label": "%arc.data.controller.admin.account.password%",
"variableName": "AZDATA_NB_VAR_ARC_ADMIN_PASSWORD",
"type": "sql_password",
"userName": "arcadmin",
"confirmationRequired": true,
"confirmationLabel": "%arc.control.plane.admin.account.confirm.password%",
"confirmationLabel": "%arc.data.controller.admin.account.confirm.password%",
"defaultValue": "",
"required": true
}
@@ -318,7 +318,7 @@
]
},
{
"title": "%arc.control.plane.data.controller.create.summary.title%",
"title": "%arc.data.controller.data.controller.create.summary.title%",
"isSummaryPage": true,
"fieldHeight": "16px",
"sections": [
@@ -334,7 +334,7 @@
{
"items": [
{
"label": "%arc.control.plane.summary.arc.data.controller%",
"label": "%arc.data.controller.summary.arc.data.controller%",
"type": "readonly_text",
"enabled": true,
"labelWidth": "185px"
@@ -344,7 +344,7 @@
{
"items": [
{
"label": "%arc.control.plane.summary.estimated.cost.per.month%",
"label": "%arc.data.controller.summary.estimated.cost.per.month%",
"type": "readonly_text",
"enabled": true,
"labelWidth": "190px",
@@ -361,7 +361,7 @@
{
"items": [
{
"label": "%arc.control.plane.summary.arc.by.microsoft%",
"label": "%arc.data.controller.summary.arc.by.microsoft%",
"type": "readonly_text",
"labelWidth": "185px"
}
@@ -370,7 +370,7 @@
{
"items": [
{
"label": "%arc.control.plane.summary.free%",
"label": "%arc.data.controller.summary.free%",
"type": "readonly_text",
"enabled": true,
"defaultValue": "",
@@ -391,7 +391,7 @@
"labelWidth": "67px",
"links": [
{
"text": "%arc.control.plane.summary.arc.terms.of.use%",
"text": "%arc.data.controller.summary.arc.terms.of.use%",
"url": "https://go.microsoft.com/fwlink/?linkid=2045708"
}
]
@@ -411,7 +411,7 @@
"labelWidth": "102px",
"links": [
{
"text": "%arc.control.plane.summary.arc.terms.privacy.policy%",
"text": "%arc.data.controller.summary.arc.terms.privacy.policy%",
"url": "https://go.microsoft.com/fwlink/?linkid=512132"
}
]
@@ -423,17 +423,17 @@
]
},
{
"title": "%arc.control.plane.summary.terms%",
"title": "%arc.data.controller.summary.terms%",
"fieldHeight": "88px",
"fields": [
{
"label": "%arc.control.plane.summary.terms.description%",
"label": "%arc.data.controller.summary.terms.description%",
"type": "readonly_text",
"enabled": true,
"labelWidth": "750px",
"links": [
{
"text": "%arc.control.plane.summary.terms.link.text%",
"text": "%arc.data.controller.summary.terms.link.text%",
"url": "https://go.microsoft.com/fwlink/?linkid=2045624"
}
]
@@ -441,28 +441,28 @@
]
},
{
"title": "%arc.control.plane.summary.kubernetes%",
"title": "%arc.data.controller.summary.kubernetes%",
"fields": [
{
"label": "%arc.control.plane.summary.kube.config.file.path%",
"label": "%arc.data.controller.summary.kube.config.file.path%",
"type": "readonly_text",
"isEvaluated": true,
"defaultValue": "$(AZDATA_NB_VAR_ARC_CONFIG_FILE)"
},
{
"label": "%arc.control.plane.summary.cluster.context%",
"label": "%arc.data.controller.summary.cluster.context%",
"type": "readonly_text",
"isEvaluated": true,
"defaultValue": "$(AZDATA_NB_VAR_ARC_CLUSTER_CONTEXT)"
},
{
"label": "%arc.control.plane.summary.profile%",
"label": "%arc.data.controller.summary.profile%",
"type": "readonly_text",
"isEvaluated": true,
"defaultValue": "$(AZDATA_NB_VAR_ARC_PROFILE)"
},
{
"label": "%arc.control.plane.summary.username%",
"label": "%arc.data.controller.summary.username%",
"type": "readonly_text",
"isEvaluated": true,
"defaultValue": "$(AZDATA_NB_VAR_ARC_ADMIN_USERNAME)"
@@ -470,41 +470,41 @@
]
},
{
"title": "%arc.control.plane.summary.azure%",
"title": "%arc.data.controller.summary.azure%",
"fields": [
{
"label": "%arc.control.plane.summary.data.controller.namespace%",
"label": "%arc.data.controller.summary.data.controller.namespace%",
"type": "readonly_text",
"isEvaluated": true,
"defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAMESPACE)"
},
{
"label": "%arc.control.plane.summary.data.controller.name%",
"label": "%arc.data.controller.summary.data.controller.name%",
"type": "readonly_text",
"isEvaluated": true,
"defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAME)"
},
{
"label": "%arc.control.plane.summary.data.controller.connectivity.mode%",
"label": "%arc.data.controller.summary.data.controller.connectivity.mode%",
"type": "readonly_text",
"isEvaluated": true,
"defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_CONNECTIVITY_MODE)"
},
{
"label": "%arc.control.plane.summary.subscription%",
"label": "%arc.data.controller.summary.subscription%",
"type": "readonly_text",
"isEvaluated": true,
"defaultValue": "$(AZDATA_NB_VAR_ARC_DISPLAY_SUBSCRIPTION)",
"inputWidth": "600"
},
{
"label": "%arc.control.plane.summary.resource.group%",
"label": "%arc.data.controller.summary.resource.group%",
"type": "readonly_text",
"isEvaluated": true,
"defaultValue": "$(AZDATA_NB_VAR_ARC_RESOURCE_GROUP)"
},
{
"label": "%arc.control.plane.summary.location%",
"label": "%arc.data.controller.summary.location%",
"type": "readonly_text",
"isEvaluated": true,
"defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_DISPLAY_LOCATION)"