rolebinding.j2 513 B

1234567891011121314151617181920212223
  1. apiVersion: v1
  2. kind: {% if cluster is defined and cluster %}Cluster{% endif %}RoleBinding
  3. metadata:
  4. name: {{obj_name}}
  5. {% if labels is defined %}
  6. labels:
  7. {% for k, v in labels.items() %}
  8. {{ k }}: {{ v }}
  9. {% endfor %}
  10. {% endif %}
  11. roleRef:
  12. {% if 'kind' in roleRef %}
  13. kind: {{ roleRef.kind }}
  14. {% endif %}
  15. name: {{ roleRef.name }}
  16. subjects:
  17. {% for sub in subjects %}
  18. - kind: {{ sub.kind }}
  19. name: {{ sub.name }}
  20. {% if 'namespace' in sub %}
  21. namespace: {{ sub.namespace }}
  22. {% endif %}
  23. {% endfor %}