Class: Gitlab::Kubernetes::ServiceAccountToken

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, service_account_name, namespace_name) ⇒ ServiceAccountToken

Returns a new instance of ServiceAccountToken.


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

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.


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

def name
  @name
end

#namespace_nameObject (readonly)

Returns the value of attribute namespace_name.


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

def namespace_name
  @namespace_name
end

#service_account_nameObject (readonly)

Returns the value of attribute service_account_name.


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

def 
  @service_account_name
end

Instance Method Details

#generateObject


14
15
16
# File 'lib/gitlab/kubernetes/service_account_token.rb', line 14

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