apiVersion: v1
kind: {{ item.type | default("RoleBinding") }}
metadata:
  name: {{ item.name }}
  namespace: {{ osbs_namespace }}

roleRef:
  name: {{ item.role }}
  namespace: {{ item.role_namespace | default() }}

userNames:
{% for u in item.users | default([]) %}
- {{ u }}
{% endfor %}

groupNames:
{% for g in item.groups | default([]) %}
- {{ g }}
{% endfor %}
