clusterrolebinding.j2 470 B

123456789101112131415161718192021222324
  1. apiVersion: v1
  2. kind: ClusterRoleBinding
  3. metadata:
  4. name: {{obj_name}}
  5. {% if crb_usernames is defined %}
  6. userNames:
  7. {% for name in crb_usernames %}
  8. - {{ name }}
  9. {% endfor %}
  10. {% endif %}
  11. {% if crb_groupnames is defined %}
  12. groupNames:
  13. {% for name in crb_groupnames %}
  14. - {{ name }}
  15. {% endfor %}
  16. {% endif %}
  17. subjects:
  18. {% for sub in subjects %}
  19. - kind: {{ sub.kind }}
  20. name: {{ sub.name }}
  21. namespace: {{sub.namespace}}
  22. {% endfor %}
  23. roleRef:
  24. name: {{obj_name}}