diff options
author | Nick Thomas <nick@gitlab.com> | 2016-12-08 16:36:26 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2016-12-14 21:06:26 +0000 |
commit | b7b83fe0c9368fa6f04dcb6eb8cd247978bba76b (patch) | |
tree | 9e2a6a71c20b8c379cfc7031903df93456c3cb10 /lib/gitlab/regex.rb | |
parent | 3e90aa1119fc4c77e92e6492f1906f252d90b64e (diff) | |
download | gitlab-ce-b7b83fe0c9368fa6f04dcb6eb8cd247978bba76b.tar.gz |
Introduce deployment services, starting with a KubernetesService
Diffstat (limited to 'lib/gitlab/regex.rb')
-rw-r--r-- | lib/gitlab/regex.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index d9d1e3cccca..7c711d581e8 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -123,5 +123,13 @@ module Gitlab def environment_name_regex_message "can contain only letters, digits, '-', '_', '/', '$', '{', '}', '.' and spaces" end + + def kubernetes_namespace_regex + /\A[a-z0-9]([-a-z0-9]*[a-z0-9])?\z/ + end + + def kubernetes_namespace_regex_message + "can contain only letters, digits or '-', and cannot start or end with '-'" + end end end |