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] 8fd414537b/pkg/util/validation/validation.go (L88-L89)

Change-Id: Icb2ed2b00afe15bd547c01895beedd5ff02b0b0d
Closes-bug: #1622899
This commit is contained in:
Peter Razumovsky 2016-10-07 14:00:45 +03:00
parent 17237b6eb3
commit 82056d980f

View File

@ -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