Method: Metatron::Templates::ClusterRoleBinding#initialize

Defined in:
lib/metatron/templates/cluster_role_binding.rb

#initialize(name, role) ⇒ ClusterRoleBinding

Returns a new instance of ClusterRoleBinding.



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/metatron/templates/cluster_role_binding.rb', line 13

def initialize(name, role)
  super(name)
  @api_version = "rbac.authorization.k8s.io/v1"
  @role = role
  @role_ref = {
    kind: "ClusterRole",
    name: role.respond_to?(:name) ? role.name : role,
    apiGroup: "rbac.authorization.k8s.io"
  }
  @subjects = []
end