k8s-docker-suite-app-murano/Applications/DockerApp/package/UI/ui.yaml
Peter Razumovsky 82056d980f 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
2016-10-07 14:08:22 +03:00

76 lines
2.8 KiB
YAML

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
Version: 2
Application:
?:
type: com.example.docker.DockerApp
name: $.appConfiguration.name
host: $.appConfiguration.host
publish: $.appConfiguration.publish
env: $.appConfiguration.env
ports: $.appConfiguration.ports
image: $.appConfiguration.image
Forms:
- appConfiguration:
fields:
- name: license
type: string
description: Apache License, Version 2.0
hidden: true
required: false
- name: name
type: string
label: Application Name
description: >-
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
- com.mirantis.docker.DockerStandaloneHost
label: Container Host
description: >-
Select an instance of Docker container hosting provider to run the app
- name: image
type: string
label: Docker image name from the Docker registry
description: >-
Please, provide an image name. You can use official Docker image names like mysql or mongo, or you can use a specific
repository name like dockerfile/mongodb.
- name: env
type: string
initial: 'Key1=Value1, key2=Value2'
required: false
label: Environment Variables
description: >-
Please, provide application environment variables as a comma separated list. Some Docker applications require
to have specific environment variables. Please check corresponding application web page.
- name: ports
type: string
label: Ports
description: >-
Please, provide comma separated application ports.
This information could be found in a Dockerfile, like EXPORT 27017
- name: publish
type: boolean
label: Visible from outside
initial: true
required: false
description: >-
Check if you intend to access the application from the Internet