@@ -26,15 +26,16 @@ spec:
26
26
- jsonPath : .status.conditions[?(@.type=="Ready")].status
27
27
name : Ready
28
28
type : string
29
- - jsonPath : .spec.name
29
+ - jsonPath : .spec.role. name
30
30
name : Name
31
31
type : string
32
- - jsonPath : .status.project .id
32
+ - jsonPath : .spec.projectIDRef .id
33
33
name : Project ID
34
34
type : string
35
35
name : v1
36
36
schema :
37
37
openAPIV3Schema :
38
+ description : AtlasCustomRole is the Schema for the AtlasCustomRole API
38
39
properties :
39
40
apiVersion :
40
41
description : |-
54
55
metadata :
55
56
type : object
56
57
spec :
57
- description : AtlasCustomRoleSpec
58
+ description : AtlasCustomRoleSpec defines the desired state of CustomRole
59
+ in Atlas
58
60
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
94
61
connectionSecret :
95
62
description : Name of the secret containing Atlas API private and public
96
63
keys
@@ -103,39 +70,103 @@ spec:
103
70
required :
104
71
- name
105
72
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
127
76
properties :
128
77
id :
129
78
description : ID is the Atlas project ID
130
- pattern : ^([a-f0-9]{24})$
131
79
type : string
132
80
required :
133
81
- id
134
82
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
135
158
required :
136
- - name
137
- - projectIDRef
159
+ - role
138
160
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)
139
170
status :
140
171
description : |-
141
172
AtlasCustomRoleStatus is a status for the AtlasCustomRole Custom resource.
@@ -177,15 +208,6 @@ spec:
177
208
The Atlas Operator updates this field to the 'metadata.generation' as soon as it starts reconciliation of the resource.
178
209
format : int64
179
210
type : integer
180
- project :
181
- properties :
182
- id :
183
- type : string
184
- ready :
185
- type : boolean
186
- type : object
187
- roleStatus :
188
- type : string
189
211
required :
190
212
- conditions
191
213
type : object
0 commit comments