Class: Gitlab::Kubernetes::RoleBinding

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

Instance Method Summary collapse

Constructor Details

#initialize(name:, role_name:, role_kind:, namespace:, service_account_name:) ⇒ RoleBinding

Returns a new instance of RoleBinding.


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

def initialize(name:, role_name:, role_kind:, namespace:, service_account_name:)
  @name = name
  @role_name = role_name
  @role_kind = role_kind
  @namespace = namespace
  @service_account_name = 
end

Instance Method Details

#generateObject


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

def generate
  ::Kubeclient::Resource.new.tap do |resource|
    resource. = 
    resource.roleRef  = role_ref
    resource.subjects = subjects
  end
end