apiVersion: v1
kind: RoleBinding
metadata:
  name: {{obj_name}}
roleRef:
{% if roleRef.kind is defined %}
  kind: {{ roleRef.kind }}
{% endif %}
  name: {{ roleRef.name }}
subjects:
{% for sub in subjects %}
  - kind: {{ sub.kind }}
    name: {{ sub.name }}
{% endfor %}
