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)"

View File

@@ -15,53 +15,53 @@
"resource.type.azure.arc.display.name": "Azure Arc data controller (preview)",
"resource.type.azure.arc.description": "Creates an Azure Arc data controller",
"arc.control.plane.new.wizard.title": "Create Azure Arc data controller",
"arc.control.plane.cluster.environment.title": "What is your target existing Kubernetes cluster environment?",
"arc.control.plane.select.cluster.title": "Select from existing Kubernetes clusters",
"arc.control.plane.kube.cluster.context": "Cluster context",
"arc.control.plane.cluster.config.profile.title": "Choose the config profile",
"arc.control.plane.cluster.config.profile": "Config profile",
"arc.control.plane.data.controller.create.title": "Provide details to create Azure Arc data controller",
"arc.control.plane.project.details.title": "Project details",
"arc.control.plane.project.details.description": "Select the subscription to manage deployed resources and costs. Use resource groups like folders to organize and manage all your resources.",
"arc.control.plane.data.controller.details.title": "Data controller details",
"arc.control.plane.data.controller.details.description": "Provide an Azure region and a name for your Azure Arc data controller. This name will be used to identify your Arc location for remote management and monitoring.",
"arc.control.plane.arc.data.controller.connectivity.mode": "Data controller connectivity mode",
"arc.control.plane.arc.data.controller.namespace": "Data controller namespace",
"arc.control.plane.arc.data.controller.namespace.validation.description": "Data controller namespace (lower case letters, digits and - only)",
"arc.control.plane.arc.data.controller.name": "Data controller name",
"arc.control.plane.arc.data.controller.name.validation.description": "Data controller name (lower case letters, digits and - only)",
"arc.control.plane.arc.data.controller.location": "Location",
"arc.control.plane.admin.account.title": "Administrator account",
"arc.control.plane.admin.account.name": "Data controller login",
"arc.control.plane.admin.account.password": "Password",
"arc.control.plane.admin.account.confirm.password": "Confirm password",
"arc.control.plane.data.controller.create.summary.title": "Review your configuration",
"arc.control.plane.summary.arc.data.controller": "Azure Arc data controller",
"arc.control.plane.summary.estimated.cost.per.month": "Estimated cost per month",
"arc.control.plane.summary.arc.by.microsoft" : "by Microsoft",
"arc.control.plane.summary.free" : "Free",
"arc.control.plane.summary.arc.terms.of.use" : "Terms of use",
"arc.control.plane.summary.arc.terms.separator" : "|",
"arc.control.plane.summary.arc.terms.privacy.policy" : "Privacy policy",
"arc.control.plane.summary.terms" : "Terms",
"arc.control.plane.summary.terms.description": "By clicking 'Script to notebook', I (a) agree to the legal terms and privacy statement(s) associated with the Marketplace offering(s) listed above; (b) authorize Microsoft to bill my current payment method for the fees associated with the offering(s), with the same billing frequency as my Azure subscription; and (c) agree that Microsoft may share my contact, usage and transactional information with the provider(s) of the offering(s) for support, billing and other transactional activities. Microsoft does not provide rights for third-party offerings. For additional details see {0}.",
"arc.control.plane.summary.terms.link.text": "Azure Marketplace Terms",
"arc.control.plane.summary.kubernetes": "Kubernetes",
"arc.control.plane.summary.kube.config.file.path": "Kube config file path",
"arc.control.plane.summary.cluster.context": "Cluster context",
"arc.control.plane.summary.profile": "Config profile",
"arc.control.plane.summary.username": "Username",
"arc.control.plane.summary.azure": "Azure",
"arc.control.plane.summary.subscription": "Subscription",
"arc.control.plane.summary.resource.group": "Resource group",
"arc.control.plane.summary.data.controller.connectivity.mode": "Data controller connectivity mode",
"arc.control.plane.summary.data.controller.name": "Data controller name",
"arc.control.plane.summary.data.controller.namespace": "Data controller namespace",
"arc.control.plane.summary.location": "Location",
"arc.control.plane.arc.data.controller.agreement": "I accept {0} and {1}.",
"arc.data.controller.new.wizard.title": "Create Azure Arc data controller",
"arc.data.controller.cluster.environment.title": "What is your target existing Kubernetes cluster environment?",
"arc.data.controller.select.cluster.title": "Select from existing Kubernetes clusters",
"arc.data.controller.kube.cluster.context": "Cluster context",
"arc.data.controller.cluster.config.profile.title": "Choose the config profile",
"arc.data.controller.cluster.config.profile": "Config profile",
"arc.data.controller.data.controller.create.title": "Provide details to create Azure Arc data controller",
"arc.data.controller.project.details.title": "Project details",
"arc.data.controller.project.details.description": "Select the subscription to manage deployed resources and costs. Use resource groups like folders to organize and manage all your resources.",
"arc.data.controller.data.controller.details.title": "Data controller details",
"arc.data.controller.data.controller.details.description": "Provide an Azure region and a name for your Azure Arc data controller. This name will be used to identify your Arc location for remote management and monitoring.",
"arc.data.controller.arc.data.controller.connectivity.mode": "Data controller connectivity mode",
"arc.data.controller.arc.data.controller.namespace": "Data controller namespace",
"arc.data.controller.arc.data.controller.namespace.validation.description": "Namespace must consist of lower case alphanumeric characters or '-', start/end with an alphanumeric character, and be 63 characters or fewer in length.",
"arc.data.controller.arc.data.controller.name": "Data controller name",
"arc.data.controller.arc.data.controller.name.validation.description": "Name must consist of lower case alphanumeric characters, '-' or '.', start/end with an alphanumeric character and be 253 characters or less in length.",
"arc.data.controller.arc.data.controller.location": "Location",
"arc.data.controller.admin.account.title": "Administrator account",
"arc.data.controller.admin.account.name": "Data controller login",
"arc.data.controller.admin.account.password": "Password",
"arc.data.controller.admin.account.confirm.password": "Confirm password",
"arc.data.controller.data.controller.create.summary.title": "Review your configuration",
"arc.data.controller.summary.arc.data.controller": "Azure Arc data controller",
"arc.data.controller.summary.estimated.cost.per.month": "Estimated cost per month",
"arc.data.controller.summary.arc.by.microsoft" : "by Microsoft",
"arc.data.controller.summary.free" : "Free",
"arc.data.controller.summary.arc.terms.of.use" : "Terms of use",
"arc.data.controller.summary.arc.terms.separator" : "|",
"arc.data.controller.summary.arc.terms.privacy.policy" : "Privacy policy",
"arc.data.controller.summary.terms" : "Terms",
"arc.data.controller.summary.terms.description": "By clicking 'Script to notebook', I (a) agree to the legal terms and privacy statement(s) associated with the Marketplace offering(s) listed above; (b) authorize Microsoft to bill my current payment method for the fees associated with the offering(s), with the same billing frequency as my Azure subscription; and (c) agree that Microsoft may share my contact, usage and transactional information with the provider(s) of the offering(s) for support, billing and other transactional activities. Microsoft does not provide rights for third-party offerings. For additional details see {0}.",
"arc.data.controller.summary.terms.link.text": "Azure Marketplace Terms",
"arc.data.controller.summary.kubernetes": "Kubernetes",
"arc.data.controller.summary.kube.config.file.path": "Kube config file path",
"arc.data.controller.summary.cluster.context": "Cluster context",
"arc.data.controller.summary.profile": "Config profile",
"arc.data.controller.summary.username": "Username",
"arc.data.controller.summary.azure": "Azure",
"arc.data.controller.summary.subscription": "Subscription",
"arc.data.controller.summary.resource.group": "Resource group",
"arc.data.controller.summary.data.controller.connectivity.mode": "Data controller connectivity mode",
"arc.data.controller.summary.data.controller.name": "Data controller name",
"arc.data.controller.summary.data.controller.namespace": "Data controller namespace",
"arc.data.controller.summary.location": "Location",
"arc.data.controller.arc.data.controller.agreement": "I accept {0} and {1}.",
"microsoft.agreement.privacy.statement":"Microsoft Privacy Statement",
"deploy.arc.control.plane.action":"Script to notebook",
"deploy.arc.data.controller.action":"Script to notebook",
"resource.type.arc.sql.display.name": "Azure SQL managed instance - Azure Arc (preview)",