From 82056d980f9ce912ce7352e3d80e3333d5e02501 Mon Sep 17 00:00:00 2001 From: Peter Razumovsky Date: Fri, 7 Oct 2016 14:00:45 +0300 Subject: [PATCH] Fix name pattern for DockerApp Currently name pattern for DockerApp allows to use underlines, dots and doesn't limit name length (at least that's described in field description). This occurs validation error with some regexp. Kubernetes docs [1] indicates, that container name should be DNS_LABEL, which described in [2]. Also, kubernetes code [3] contains regexp and length limit for DNS_LABEL pattern. [1] http://kubernetes.io/docs/user-guide/pods/multi-container/#containers [2] http://kubernetes.io/docs/user-guide/labels/#syntax-and-character-set [3] https://github.com/kubernetes/kubernetes/blob/8fd414537b5143ab039cb910590237cabf4af783/pkg/util/validation/validation.go#L88-L89 Change-Id: Icb2ed2b00afe15bd547c01895beedd5ff02b0b0d Closes-bug: #1622899 --- Applications/DockerApp/package/UI/ui.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Applications/DockerApp/package/UI/ui.yaml b/Applications/DockerApp/package/UI/ui.yaml index 3c20343..956e209 100644 --- a/Applications/DockerApp/package/UI/ui.yaml +++ b/Applications/DockerApp/package/UI/ui.yaml @@ -35,8 +35,10 @@ Forms: type: string label: Application Name description: >- - Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and - underline are allowed + Enter a desired name for the application. Just A-Z, a-z, 0-9 and + dash are allowed. Should be less than 64 characters. + maxLength: 63 + regexpValidator: '^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$' - name: host type: - com.mirantis.docker.kubernetes.KubernetesPod