Class: Gitlab::Kubernetes::Role

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

Instance Method Summary collapse

Constructor Details

#initialize(name:, namespace:, rules:) ⇒ Role

Returns a new instance of Role.


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

def initialize(name:, namespace:, rules:)
  @name = name
  @namespace = namespace
  @rules = rules
end

Instance Method Details

#generateObject


12
13
14
15
16
17
# File 'lib/gitlab/kubernetes/role.rb', line 12

def generate
  ::Kubeclient::Resource.new(
    metadata: { name: name, namespace: namespace },
    rules: rules
  )
end