Skip to content

Commit a19871c

Browse files
Updating api for klusterlet to accomodate awsirsa registration (#339)
Signed-off-by: Erica <[email protected]>
1 parent bd6f222 commit a19871c

5 files changed

+121
-0
lines changed

crdsv1beta1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,24 @@ spec:
185185
type: integer
186186
format: int32
187187
default: 50
188+
registrationDriver:
189+
description: This provides driver details required to register with hub
190+
type: object
191+
properties:
192+
authType:
193+
description: Type of the authentication used by managedcluster to register as well as pull work from hub. Possible values are csr and awsirsa.
194+
type: string
195+
default: csr
196+
enum:
197+
- csr
198+
- awsirsa
199+
awsIrsa:
200+
description: 'Contain the details required for registering with hub cluster (ie: an EKS cluster) using AWS IAM roles for service account. This is required only when the authType is awsirsa.'
201+
type: object
202+
properties:
203+
hubClusterArn:
204+
description: 'The arn of the hub cluster (ie: an EKS cluster). This will be required to pass information to hub, which hub will use to create IAM identities for this klusterlet. Example - arn:eks:us-west-2:12345678910:cluster/hub-cluster1.'
205+
type: string
188206
registrationImagePullSpec:
189207
description: RegistrationImagePullSpec represents the desired image configuration of registration agent. quay.io/open-cluster-management.io/registration:latest will be used if unspecified.
190208
type: string

operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,31 @@ spec:
289289
If it is set empty, use the default value: 50
290290
format: int32
291291
type: integer
292+
registrationDriver:
293+
description: This provides driver details required to register
294+
with hub
295+
properties:
296+
authType:
297+
default: csr
298+
description: Type of the authentication used by managedcluster
299+
to register as well as pull work from hub. Possible values
300+
are csr and awsirsa.
301+
enum:
302+
- csr
303+
- awsirsa
304+
type: string
305+
awsIrsa:
306+
description: |-
307+
Contain the details required for registering with hub cluster (ie: an EKS cluster) using AWS IAM roles for service account.
308+
This is required only when the authType is awsirsa.
309+
properties:
310+
hubClusterArn:
311+
description: |-
312+
The arn of the hub cluster (ie: an EKS cluster). This will be required to pass information to hub, which hub will use to create IAM identities for this klusterlet.
313+
Example - arn:eks:us-west-2:12345678910:cluster/hub-cluster1.
314+
type: string
315+
type: object
316+
type: object
292317
type: object
293318
registrationImagePullSpec:
294319
description: |-

operator/v1/types_klusterlet.go

+22
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,28 @@ type RegistrationConfiguration struct {
172172
// But if the user updates the content of a failed bootstrapkubeconfig, the "failed" mark will be cleared.
173173
// +optional
174174
BootstrapKubeConfigs BootstrapKubeConfigs `json:"bootstrapKubeConfigs,omitempty"`
175+
176+
// This provides driver details required to register with hub
177+
// +optional
178+
RegistrationDriver RegistrationDriver `json:"registrationDriver,omitempty"`
179+
}
180+
181+
type RegistrationDriver struct {
182+
// Type of the authentication used by managedcluster to register as well as pull work from hub. Possible values are csr and awsirsa.
183+
// +kubebuilder:default:=csr
184+
// +kubebuilder:validation:Enum=csr;awsirsa
185+
AuthType string `json:"authType"`
186+
187+
// Contain the details required for registering with hub cluster (ie: an EKS cluster) using AWS IAM roles for service account.
188+
// This is required only when the authType is awsirsa.
189+
AwsIrsa *AwsIrsa `json:"awsIrsa,omitempty"`
190+
}
191+
192+
type AwsIrsa struct {
193+
// The arn of the hub cluster (ie: an EKS cluster). This will be required to pass information to hub, which hub will use to create IAM identities for this klusterlet.
194+
// Example - arn:eks:us-west-2:12345678910:cluster/hub-cluster1.
195+
// +required
196+
HubClusterArn string `json:"hubClusterArn"`
175197
}
176198

177199
type TypeBootstrapKubeConfigs string

operator/v1/zz_generated.deepcopy.go

+38
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

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

0 commit comments

Comments
 (0)