mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-07-25 17:08:32 +00:00

This model will be used to persist into database Kubernetes properties, such as namespace, service account name and service account token.
10 lines
179 B
Ruby
10 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
|