diff options
author | Nick Thomas <nick@gitlab.com> | 2016-12-08 19:36:26 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2016-12-15 00:06:26 +0300 |
commit | b7b83fe0c9368fa6f04dcb6eb8cd247978bba76b (patch) | |
tree | 9e2a6a71c20b8c379cfc7031903df93456c3cb10 /lib/gitlab | |
parent | 3e90aa1119fc4c77e92e6492f1906f252d90b64e (diff) |
Introduce deployment services, starting with a KubernetesService
Diffstat (limited to 'lib/gitlab')
-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 |