![Mayra Cabrera](/assets/img/avatar_default.png)
This model will be used to persist into database Kubernetes properties, such as namespace, service account name and service account token.
9 lines
179 B
Ruby
9 lines
179 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
class NamespaceSanitizer
|
|
def self.sanitize(namespace)
|
|
namespace.gsub(/[^-a-z0-9]/, '-').gsub(/^-+/, '')
|
|
end
|
|
end
|
|
end
|