Class: Gitlab::Kubernetes::TlsSecret

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, cert, key, namespace_name) ⇒ TlsSecret

Returns a new instance of TlsSecret.



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

def initialize(name, cert, key, namespace_name)
  @name = name
  @cert = cert
  @key = key
  @namespace_name = namespace_name
end

Instance Attribute Details

#certObject (readonly)

Returns the value of attribute cert.



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

def cert
  @cert
end

#keyObject (readonly)

Returns the value of attribute key.



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

def key
  @key
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/gitlab/kubernetes/tls_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/tls_secret.rb', line 6

def namespace_name
  @namespace_name
end

Instance Method Details

#generateObject



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

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