Update openshift role to use namespace-local roles
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
aaa694f7e4
commit
78ff12f828
2 changed files with 9 additions and 0 deletions
|
@ -5,6 +5,10 @@ metadata:
|
||||||
name: appowners
|
name: appowners
|
||||||
roleRef:
|
roleRef:
|
||||||
name: appowner
|
name: appowner
|
||||||
|
{% if env == "staging" %}
|
||||||
|
# See note in role-appowners.yml
|
||||||
|
namespace: "{{app}}"
|
||||||
|
{% endif %}
|
||||||
userNames:
|
userNames:
|
||||||
{% for owner in appowners %}
|
{% for owner in appowners %}
|
||||||
- {{ owner }}
|
- {{ owner }}
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
{% if env == "staging" %}
|
||||||
|
kind: Role
|
||||||
|
{% else %}
|
||||||
# Namespace-local roles did not work until openshift 3.6
|
# Namespace-local roles did not work until openshift 3.6
|
||||||
# https://github.com/openshift/origin/issues/14078
|
# https://github.com/openshift/origin/issues/14078
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
|
{% endif %}
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
openshift.io/description: An application owner. Can view everything but ConfigMaps.
|
openshift.io/description: An application owner. Can view everything but ConfigMaps.
|
||||||
name: appowner
|
name: appowner
|
||||||
|
namespace: "{{ app }}"
|
||||||
rules:
|
rules:
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue