From cdcdc9bb25d9c59a2b7321f4eb89bb6ab9fd36e6 Mon Sep 17 00:00:00 2001 From: Suvaansh <34331549+suvaanshkumar@users.noreply.github.com> Date: Mon, 23 Sep 2024 20:23:44 +0000 Subject: [PATCH] Add managed cluster arn for the klusterlet api Signed-off-by: Suvaansh <34331549+suvaanshkumar@users.noreply.github.com> --- ...operator.open-cluster-management.io_klusterlets.crd.yaml | 3 +++ ...operator.open-cluster-management.io_klusterlets.crd.yaml | 6 ++++++ operator/v1/types_klusterlet.go | 5 +++++ operator/v1/zz_generated.swagger_doc_generated.go | 3 ++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/crdsv1beta1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml b/crdsv1beta1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml index dd5cb6a8..402f6ec8 100644 --- a/crdsv1beta1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml +++ b/crdsv1beta1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml @@ -203,6 +203,9 @@ spec: hubClusterArn: 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.' type: string + managedClusterArn: + description: 'The arn of the managed cluster (ie: an EKS cluster). This will be required to generate the md5hash which will be used as a suffix to create IAM role on hub as well as used by kluslerlet-agent, to assume role suffixed with the md5hash, on startup. Example - arn:eks:us-west-2:12345678910:cluster/managed-cluster1.' + type: string registrationImagePullSpec: description: RegistrationImagePullSpec represents the desired image configuration of registration agent. quay.io/open-cluster-management.io/registration:latest will be used if unspecified. type: string diff --git a/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml b/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml index 73d78280..77d07732 100644 --- a/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml +++ b/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml @@ -312,6 +312,12 @@ spec: 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. type: string + managedClusterArn: + description: |- + The arn of the managed cluster (ie: an EKS cluster). This will be required to generate the md5hash which will be used as a suffix to create IAM role on hub + as well as used by kluslerlet-agent, to assume role suffixed with the md5hash, on startup. + Example - arn:eks:us-west-2:12345678910:cluster/managed-cluster1. + type: string type: object type: object type: object diff --git a/operator/v1/types_klusterlet.go b/operator/v1/types_klusterlet.go index 97e6fa53..9ee4e554 100644 --- a/operator/v1/types_klusterlet.go +++ b/operator/v1/types_klusterlet.go @@ -194,6 +194,11 @@ type AwsIrsa struct { // Example - arn:eks:us-west-2:12345678910:cluster/hub-cluster1. // +required HubClusterArn string `json:"hubClusterArn"` + // The arn of the managed cluster (ie: an EKS cluster). This will be required to generate the md5hash which will be used as a suffix to create IAM role on hub + // as well as used by kluslerlet-agent, to assume role suffixed with the md5hash, on startup. + // Example - arn:eks:us-west-2:12345678910:cluster/managed-cluster1. + // +required + ManagedClusterArn string `json:"managedClusterArn"` } type TypeBootstrapKubeConfigs string diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go index c6085cdc..5d63b919 100644 --- a/operator/v1/zz_generated.swagger_doc_generated.go +++ b/operator/v1/zz_generated.swagger_doc_generated.go @@ -164,7 +164,8 @@ func (WorkConfiguration) SwaggerDoc() map[string]string { } var map_AwsIrsa = map[string]string{ - "hubClusterArn": "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.", + "hubClusterArn": "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.", + "managedClusterArn": "The arn of the managed cluster (ie: an EKS cluster). This will be required to generate the md5hash which will be used as a suffix to create IAM role on hub as well as used by kluslerlet-agent, to assume role suffixed with the md5hash, on startup. Example - arn:eks:us-west-2:12345678910:cluster/managed-cluster1.", } func (AwsIrsa) SwaggerDoc() map[string]string {