File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ parameters:
7
7
value : namespace-reservation-server:latest
8
8
- name : NAMESPACE
9
9
value : openshift-namespace-reservation
10
+ - name : SERVICE_SERVING_CERT_CA
10
11
- name : LOGLEVEL
11
12
value : " 0"
12
13
objects :
@@ -95,4 +96,27 @@ objects:
95
96
# singular name to be used as an alias on the CLI and for display
96
97
singular : namespacereservation
97
98
# kind is normally the CamelCased singular type. Your resource manifests use this.
98
- kind : NamespaceReservation
99
+ kind : NamespaceReservation
100
+
101
+ # register to intercept projectrequest creates
102
+ - apiVersion : admissionregistration.k8s.io/v1alpha1
103
+ kind : ExternalAdmissionHookConfiguration
104
+ metadata :
105
+ name : namespacereservations.admission.online.openshift.io
106
+ externalAdmissionHooks :
107
+ - name : namespacereservations.admission.online.openshift.io/apis/admission.online.openshift.io/v1alpha1/namespacereservations
108
+ clientConfig :
109
+ service :
110
+ namespace : ${NAMESPACE}
111
+ name : server
112
+ caBundle : ${SERVICE_SERVING_CERT_CA}
113
+ rules :
114
+ - operations :
115
+ - CREATE
116
+ apiGroups :
117
+ - project.openshift.io
118
+ apiVersions :
119
+ - " *"
120
+ resources :
121
+ - projectrequests
122
+ failurePolicy : Fail
Original file line number Diff line number Diff line change @@ -22,7 +22,23 @@ objects:
22
22
namespace : ${NAMESPACE}
23
23
name : server
24
24
25
- # to have the template service broker powers
25
+ # to let the admission server read the namespace reservations
26
+ - apiVersion : rbac.authorization.k8s.io/v1beta1
27
+ kind : ClusterRole
28
+ metadata :
29
+ annotations :
30
+ name : system:openshift:online:namespace-reservation-server
31
+ rules :
32
+ - apiGroups :
33
+ - online.openshift.io
34
+ resources :
35
+ - namespacereservations
36
+ verbs :
37
+ - get
38
+ list
39
+ watch
40
+
41
+ # to let the admission server read the namespace reservations
26
42
- apiVersion : rbac.authorization.k8s.io/v1beta1
27
43
kind : ClusterRoleBinding
28
44
metadata :
You can’t perform that action at this time.
0 commit comments