Skip to content

Commit 8b8a459

Browse files
committed
Update clustermanager API spec for auto approval identities
Signed-off-by: “Jeffrey <[email protected]>
1 parent 3a595d6 commit 8b8a459

4 files changed

+84
-3
lines changed

operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,31 @@ spec:
216216
description: RegistrationConfiguration contains the configuration
217217
of registration
218218
properties:
219+
autoApprovalIdentities:
220+
description: |-
221+
AutoApprovalIdentities represent the list of approved identities which is used to whitelist certain identities to join with the hub cluster
222+
An ApprovedIdentities contains details of the driver type (csr, awsirsa) and a list of identities to whitelist.
223+
items:
224+
properties:
225+
driver:
226+
description: Type of authentication used for specific set
227+
of identities to whitelist. Possible values are csr and
228+
awsirsa.
229+
enum:
230+
- csr
231+
- awsirsa
232+
type: string
233+
identities:
234+
description: Identities represent a list of users in which
235+
we will allow to join with hub cluster
236+
items:
237+
type: string
238+
type: array
239+
type: object
240+
type: array
241+
x-kubernetes-list-map-keys:
242+
- driver
243+
x-kubernetes-list-type: map
219244
autoApproveUsers:
220245
description: |-
221246
AutoApproveUser represents a list of users that can auto approve CSR and accept client. If the credential of the

operator/v1/types_clustermanager.go

+18
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ type RegistrationHubConfiguration struct {
115115
// +listType=map
116116
// +listMapKey=authType
117117
RegistrationDrivers []RegistrationDriverHub `json:"registrationDrivers,omitempty"`
118+
119+
// AutoApprovalIdentities represent the list of approved identities which is used to whitelist certain identities to join with the hub cluster
120+
// An ApprovedIdentities contains details of the driver type (csr, awsirsa) and a list of identities to whitelist.
121+
// +optional
122+
// +listType=map
123+
// +listMapKey=driver
124+
AutoApprovalIdentities []ApprovedIdentities `json:"autoApprovalIdentities,omitempty"`
118125
}
119126

120127
type RegistrationDriverHub struct {
@@ -132,6 +139,17 @@ type RegistrationDriverHub struct {
132139
HubClusterArn string `json:"hubClusterArn,omitempty"`
133140
}
134141

142+
type ApprovedIdentities struct {
143+
// Type of authentication used for specific set of identities to whitelist. Possible values are csr and awsirsa.
144+
// +required
145+
// +kubebuilder:validation:Enum=csr;awsirsa
146+
Driver string `json:"driver,omitempty"`
147+
148+
// Identities represent a list of users in which we will allow to join with hub cluster
149+
// +optional
150+
Identities []string `json:"identities,omitempty"`
151+
}
152+
135153
type WorkConfiguration struct {
136154
// FeatureGates represents the list of feature gates for work
137155
// If it is set empty, default feature gates will be used.

operator/v1/zz_generated.deepcopy.go

+28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operator/v1/zz_generated.swagger_doc_generated.go

+13-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)