Class: Gitlab::Kubernetes::GenericSecret

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/kubernetes/generic_secret.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, data, namespace_name) ⇒ GenericSecret

Returns a new instance of GenericSecret.



8
9
10
11
12
# File 'lib/gitlab/kubernetes/generic_secret.rb', line 8

def initialize(name, data, namespace_name)
  @name = name
  @data = data
  @namespace_name = namespace_name
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



6
7
8
# File 'lib/gitlab/kubernetes/generic_secret.rb', line 6

def data
  @data
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/gitlab/kubernetes/generic_secret.rb', line 6

def name
  @name
end

#namespace_nameObject (readonly)

Returns the value of attribute namespace_name.



6
7
8
# File 'lib/gitlab/kubernetes/generic_secret.rb', line 6

def namespace_name
  @namespace_name
end

Instance Method Details

#generateObject



14
15
16
17
18
19
20
# File 'lib/gitlab/kubernetes/generic_secret.rb', line 14

def generate
  ::Kubeclient::Resource.new(
    type: generic_secret_type,
    metadata: ,
    data: data
  )
end