Skip to content

Commit 467bc8f

Browse files
authored
Update Chart CRD (#72)
Signed-off-by: fxiang1 <fxiang@redhat.com>
1 parent 3267edb commit 467bc8f

1 file changed

Lines changed: 107 additions & 0 deletions

File tree

chart/crds/rbac.open-cluster-management.io_clusterpermissions.yaml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,107 @@ spec:
194194
x-kubernetes-validations:
195195
- message: Either subject or subjects has to exist in clusterRoleBinding
196196
rule: has(self.subject) || has(self.subjects)
197+
clusterRoleBindings:
198+
description: ClusterRoleBindings represents multiple ClusterRoleBindings
199+
that are being created on the managed cluster
200+
items:
201+
description: ClusterRoleBinding represents the ClusterRoleBinding
202+
that is being created on the managed cluster
203+
properties:
204+
name:
205+
description: Name of the ClusterRoleBinding if a name different
206+
than the ClusterPermission name is used
207+
type: string
208+
roleRef:
209+
description: RoleRef contains information that points to the
210+
ClusterRole being used
211+
properties:
212+
apiGroup:
213+
description: APIGroup is the group for the resource being
214+
referenced
215+
type: string
216+
kind:
217+
description: Kind is the type of resource being referenced
218+
type: string
219+
name:
220+
description: Name is the name of resource being referenced
221+
type: string
222+
required:
223+
- apiGroup
224+
- kind
225+
- name
226+
type: object
227+
x-kubernetes-map-type: atomic
228+
subject:
229+
description: |-
230+
Subject contains a reference to the object or user identities a ClusterPermission binding applies to.
231+
Besides the typical subject for a binding, a ManagedServiceAccount can be used as a subject as well.
232+
If both subject and subjects exist then only subjects will be used.
233+
properties:
234+
apiGroup:
235+
description: |-
236+
APIGroup holds the API group of the referenced subject.
237+
Defaults to "" for ServiceAccount subjects.
238+
Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
239+
type: string
240+
kind:
241+
description: |-
242+
Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
243+
If the Authorizer does not recognized the kind value, the Authorizer should report an error.
244+
type: string
245+
name:
246+
description: Name of the object being referenced.
247+
type: string
248+
namespace:
249+
description: |-
250+
Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
251+
the Authorizer should report an error.
252+
type: string
253+
required:
254+
- kind
255+
- name
256+
type: object
257+
x-kubernetes-map-type: atomic
258+
subjects:
259+
description: |-
260+
Subjects contains an array of references to objects or user identities a ClusterPermission binding applies to.
261+
Besides the typical subject for a binding, a ManagedServiceAccount can be used as a subject as well.
262+
If both subject and subjects exist then only subjects will be used.
263+
items:
264+
description: |-
265+
Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
266+
or a value for non-objects such as user and group names.
267+
properties:
268+
apiGroup:
269+
description: |-
270+
APIGroup holds the API group of the referenced subject.
271+
Defaults to "" for ServiceAccount subjects.
272+
Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
273+
type: string
274+
kind:
275+
description: |-
276+
Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
277+
If the Authorizer does not recognized the kind value, the Authorizer should report an error.
278+
type: string
279+
name:
280+
description: Name of the object being referenced.
281+
type: string
282+
namespace:
283+
description: |-
284+
Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
285+
the Authorizer should report an error.
286+
type: string
287+
required:
288+
- kind
289+
- name
290+
type: object
291+
x-kubernetes-map-type: atomic
292+
type: array
293+
type: object
294+
type: array
295+
x-kubernetes-validations:
296+
- message: Either subject or subjects has to exist in every clusterRoleBinding
297+
rule: self.all(i, has(i.subject) || has(i.subjects))
197298
roleBindings:
198299
description: RoleBindings represents RoleBindings that are being created
199300
on the managed cluster
@@ -460,6 +561,12 @@ spec:
460561
- rules
461562
type: object
462563
type: array
564+
validate:
565+
description: |-
566+
Validate enables validation of roles and clusterroles on the managed cluster using ManifestWork
567+
When enabled, the controller will create a validation ManifestWork to check if the referenced
568+
roles and clusterroles exist on the managed cluster
569+
type: boolean
463570
type: object
464571
status:
465572
description: ClusterPermissionStatus defines the observed state of ClusterPermission

0 commit comments

Comments
 (0)