blob: 8a8a59a9cd48d10bb51ec94cd425042f84f3057b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
module Gitlab
module Kubernetes
class ConfigMap
def initialize(name, values = "")
@name = name
@values = values
end
def generate
resource = ::Kubeclient::Resource.new
resource.metadata = metadata
resource.data = { values: values }
resource
end
def config_map_name
"values-content-configuration-#{name}"
end
private
attr_reader :name, :values
def metadata
{
name: config_map_name,
namespace: namespace,
labels: { name: config_map_name }
}
end
def namespace
Gitlab::Kubernetes::Helm::NAMESPACE
end
end
end
end
|