@@ -26,15 +26,16 @@ spec:
2626 - jsonPath : .status.conditions[?(@.type=="Ready")].status
2727 name : Ready
2828 type : string
29- - jsonPath : .spec.name
29+ - jsonPath : .spec.role. name
3030 name : Name
3131 type : string
32- - jsonPath : .status.project .id
32+ - jsonPath : .spec.projectIDRef .id
3333 name : Project ID
3434 type : string
3535 name : v1
3636 schema :
3737 openAPIV3Schema :
38+ description : AtlasCustomRole is the Schema for the AtlasCustomRole API
3839 properties :
3940 apiVersion :
4041 description : |-
5455 metadata :
5556 type : object
5657 spec :
57- description : AtlasCustomRoleSpec
58+ description : AtlasCustomRoleSpec defines the desired state of CustomRole
59+ in Atlas
5860 properties :
59- actions :
60- description : List of the individual privilege actions that the role
61- grants.
62- items :
63- properties :
64- name :
65- description : Human-readable label that identifies the privilege
66- action.
67- type : string
68- resources :
69- description : List of resources on which you grant the action.
70- items :
71- properties :
72- cluster :
73- description : Flag that indicates whether to grant the
74- action on the cluster resource. If true, MongoDB Cloud
75- ignores Database and Collection parameters.
76- type : boolean
77- collection :
78- description : Human-readable label that identifies the
79- collection on which you grant the action to one MongoDB
80- user.
81- type : string
82- database :
83- description : Human-readable label that identifies the
84- database on which you grant the action to one MongoDB
85- user.
86- type : string
87- type : object
88- type : array
89- required :
90- - name
91- - resources
92- type : object
93- type : array
9461 connectionSecret :
9562 description : Name of the secret containing Atlas API private and public
9663 keys
@@ -103,39 +70,103 @@ spec:
10370 required :
10471 - name
10572 type : object
106- inheritedRoles :
107- description : List of the built-in roles that this custom role inherits.
108- items :
109- properties :
110- database :
111- description : Human-readable label that identifies the database
112- on which someone grants the action to one MongoDB user.
113- type : string
114- name :
115- description : Human-readable label that identifies the role inherited.
116- type : string
117- required :
118- - database
119- - name
120- type : object
121- type : array
122- name :
123- description : Name of the custom role
124- type : string
125- projectIDRef :
126- description : ID of the Atlas Project this role is attached to
73+ externalProjectRef :
74+ description : Optional ID of the Atlas Project this role is attached
75+ to. Mutually exclusive with "projectRef" field
12776 properties :
12877 id :
12978 description : ID is the Atlas project ID
130- pattern : ^([a-f0-9]{24})$
13179 type : string
13280 required :
13381 - id
13482 type : object
83+ projectRef :
84+ description : Optional reference to an AtlasProject custom resource.
85+ Mutually exclusive with "externalProjectRef" field
86+ properties :
87+ name :
88+ description : Name is the name of the Kubernetes Resource
89+ type : string
90+ namespace :
91+ description : Namespace is the namespace of the Kubernetes Resource
92+ type : string
93+ required :
94+ - name
95+ type : object
96+ role :
97+ properties :
98+ actions :
99+ description : List of the individual privilege actions that the
100+ role grants.
101+ items :
102+ properties :
103+ name :
104+ description : Human-readable label that identifies the privilege
105+ action.
106+ type : string
107+ resources :
108+ description : List of resources on which you grant the action.
109+ items :
110+ properties :
111+ cluster :
112+ description : Flag that indicates whether to grant
113+ the action on the cluster resource. If true, MongoDB
114+ Cloud ignores Database and Collection parameters.
115+ type : boolean
116+ collection :
117+ description : Human-readable label that identifies
118+ the collection on which you grant the action to
119+ one MongoDB user.
120+ type : string
121+ database :
122+ description : Human-readable label that identifies
123+ the database on which you grant the action to one
124+ MongoDB user.
125+ type : string
126+ type : object
127+ type : array
128+ required :
129+ - name
130+ - resources
131+ type : object
132+ type : array
133+ inheritedRoles :
134+ description : List of the built-in roles that this custom role
135+ inherits.
136+ items :
137+ properties :
138+ database :
139+ description : Human-readable label that identifies the database
140+ on which someone grants the action to one MongoDB user.
141+ type : string
142+ name :
143+ description : Human-readable label that identifies the role
144+ inherited.
145+ type : string
146+ required :
147+ - database
148+ - name
149+ type : object
150+ type : array
151+ name :
152+ description : Human-readable label that identifies the role. This
153+ name must be unique for this custom role in this project.
154+ type : string
155+ required :
156+ - name
157+ type : object
135158 required :
136- - name
137- - projectIDRef
159+ - role
138160 type : object
161+ x-kubernetes-validations :
162+ - message : must define only one project reference through externalProjectRef
163+ or projectRef
164+ rule : (has(self.externalProjectRef) && !has(self.projectRef)) || (!has(self.externalProjectRef)
165+ && has(self.projectRef))
166+ - message : must define a local connection secret when referencing an external
167+ project
168+ rule : (has(self.externalProjectRef) && has(self.connectionSecret)) ||
169+ !has(self.externalProjectRef)
139170 status :
140171 description : |-
141172 AtlasCustomRoleStatus is a status for the AtlasCustomRole Custom resource.
@@ -177,15 +208,6 @@ spec:
177208 The Atlas Operator updates this field to the 'metadata.generation' as soon as it starts reconciliation of the resource.
178209 format : int64
179210 type : integer
180- project :
181- properties :
182- id :
183- type : string
184- ready :
185- type : boolean
186- type : object
187- roleStatus :
188- type : string
189211 required :
190212 - conditions
191213 type : object
0 commit comments