summaryrefslogtreecommitdiffstats
path: root/roles/openshift_provisioners/templates/clusterrolebinding.j2
diff options
context:
space:
mode:
authorMatthew Wong <mawong@redhat.com>2017-03-30 13:21:00 -0400
committerMatthew Wong <mawong@redhat.com>2017-03-30 13:24:21 -0400
commitf2f58c7cda094d933991cebacab3dfdbee86fe6d (patch)
treee99aecedc42a54a134295603ad589c701fb29716 /roles/openshift_provisioners/templates/clusterrolebinding.j2
parent573e91d03d7dccd79a03774c6889c2c2753836b1 (diff)
downloadopenshift-f2f58c7cda094d933991cebacab3dfdbee86fe6d.tar.gz
openshift-f2f58c7cda094d933991cebacab3dfdbee86fe6d.tar.bz2
openshift-f2f58c7cda094d933991cebacab3dfdbee86fe6d.tar.xz
openshift-f2f58c7cda094d933991cebacab3dfdbee86fe6d.zip
Add external provisioners playbook starting with aws efs
Diffstat (limited to 'roles/openshift_provisioners/templates/clusterrolebinding.j2')
-rw-r--r--roles/openshift_provisioners/templates/clusterrolebinding.j230
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/openshift_provisioners/templates/clusterrolebinding.j2 b/roles/openshift_provisioners/templates/clusterrolebinding.j2
new file mode 100644
index 000000000..994afa32d
--- /dev/null
+++ b/roles/openshift_provisioners/templates/clusterrolebinding.j2
@@ -0,0 +1,30 @@
+apiVersion: v1
+kind: ClusterRoleBinding
+metadata:
+ name: {{obj_name}}
+{% if labels is defined%}
+ labels:
+{% for key, value in labels.iteritems() %}
+ {{key}}: {{value}}
+{% endfor %}
+{% endif %}
+{% if crb_usernames is defined %}
+userNames:
+{% for name in crb_usernames %}
+ - {{ name }}
+{% endfor %}
+{% endif %}
+{% if crb_groupnames is defined %}
+groupNames:
+{% for name in crb_groupnames %}
+ - {{ name }}
+{% endfor %}
+{% endif %}
+subjects:
+{% for sub in subjects %}
+ - kind: {{ sub.kind }}
+ name: {{ sub.name }}
+ namespace: {{sub.namespace}}
+{% endfor %}
+roleRef:
+ name: {{cr_name}}