File tree Expand file tree Collapse file tree 3 files changed +100
-0
lines changed
tests/golden/defaults/openshift-upgrade-controller/openshift-upgrade-controller Expand file tree Collapse file tree 3 files changed +100
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ parameters:
8
8
- input_paths :
9
9
- ${_base_directory}/component/main.jsonnet
10
10
- ${_base_directory}/component/cluster-version.jsonnet
11
+ - ${_base_directory}/component/rbac.jsonnet
11
12
input_type : jsonnet
12
13
output_path : openshift-upgrade-controller/
13
14
Original file line number Diff line number Diff line change
1
+ local kube = import 'lib/kube.libjsonnet' ;
2
+
3
+ local aggregatedRoles = [
4
+ kube.ClusterRole('syn:openshift-upgrade-controller:view' ) {
5
+ metadata+: {
6
+ labels+: {
7
+ 'rbac.authorization.k8s.io/aggregate-to-admin' : 'true' ,
8
+ 'rbac.authorization.k8s.io/aggregate-to-edit' : 'true' ,
9
+ 'rbac.authorization.k8s.io/aggregate-to-view' : 'true' ,
10
+ },
11
+ },
12
+ rules: [
13
+ {
14
+ apiGroups: 'managedupgrade.appuio.io' ,
15
+ resources: [
16
+ 'clusterversions' ,
17
+ 'upgradeconfigs' ,
18
+ 'upgradejobs' ,
19
+ ],
20
+ verbs: [
21
+ 'get' ,
22
+ 'list' ,
23
+ 'watch' ,
24
+ ],
25
+ },
26
+ ],
27
+ },
28
+ kube.ClusterRole('syn:openshift-upgrade-controller:edit' ) {
29
+ metadata+: {
30
+ labels+: {
31
+ 'rbac.authorization.k8s.io/aggregate-to-admin' : 'true' ,
32
+ 'rbac.authorization.k8s.io/aggregate-to-edit' : 'true' ,
33
+ },
34
+ },
35
+ rules: [
36
+ {
37
+ apiGroups: 'managedupgrade.appuio.io' ,
38
+ resources: [
39
+ 'clusterversions' ,
40
+ 'upgradeconfigs' ,
41
+ 'upgradejobs' ,
42
+ ],
43
+ verbs: [
44
+ 'create' ,
45
+ 'delete' ,
46
+ 'deletecollection' ,
47
+ 'patch' ,
48
+ 'update' ,
49
+ ],
50
+ },
51
+ ],
52
+ },
53
+ ];
54
+
55
+ {
56
+ '30_rbac' : aggregatedRoles,
57
+ }
Original file line number Diff line number Diff line change
1
+ apiVersion : rbac.authorization.k8s.io/v1
2
+ kind : ClusterRole
3
+ metadata :
4
+ annotations : {}
5
+ labels :
6
+ name : syn-openshift-upgrade-controller-view
7
+ rbac.authorization.k8s.io/aggregate-to-admin : ' true'
8
+ rbac.authorization.k8s.io/aggregate-to-edit : ' true'
9
+ rbac.authorization.k8s.io/aggregate-to-view : ' true'
10
+ name : syn:openshift-upgrade-controller:view
11
+ rules :
12
+ - apiGroups : managedupgrade.appuio.io
13
+ resources :
14
+ - clusterversions
15
+ - upgradeconfigs
16
+ - upgradejobs
17
+ verbs :
18
+ - get
19
+ - list
20
+ - watch
21
+ ---
22
+ apiVersion : rbac.authorization.k8s.io/v1
23
+ kind : ClusterRole
24
+ metadata :
25
+ annotations : {}
26
+ labels :
27
+ name : syn-openshift-upgrade-controller-edit
28
+ rbac.authorization.k8s.io/aggregate-to-admin : ' true'
29
+ rbac.authorization.k8s.io/aggregate-to-edit : ' true'
30
+ name : syn:openshift-upgrade-controller:edit
31
+ rules :
32
+ - apiGroups : managedupgrade.appuio.io
33
+ resources :
34
+ - clusterversions
35
+ - upgradeconfigs
36
+ - upgradejobs
37
+ verbs :
38
+ - create
39
+ - delete
40
+ - deletecollection
41
+ - patch
42
+ - update
You can’t perform that action at this time.
0 commit comments