Update openshift role to use namespace-local roles

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2018-03-09 22:53:23 +01:00
parent aaa694f7e4
commit 78ff12f828
2 changed files with 9 additions and 0 deletions

View file

@ -5,6 +5,10 @@ metadata:
name: appowners
roleRef:
name: appowner
{% if env == "staging" %}
# See note in role-appowners.yml
namespace: "{{app}}"
{% endif %}
userNames:
{% for owner in appowners %}
- {{ owner }}

View file

@ -1,11 +1,16 @@
apiVersion: v1
{% if env == "staging" %}
kind: Role
{% else %}
# Namespace-local roles did not work until openshift 3.6
# https://github.com/openshift/origin/issues/14078
kind: ClusterRole
{% endif %}
metadata:
annotations:
openshift.io/description: An application owner. Can view everything but ConfigMaps.
name: appowner
namespace: "{{ app }}"
rules:
- apiGroups:
- ""