From abaf09c1e5d450c978fb8581755c2fa6ea613e6c Mon Sep 17 00:00:00 2001 From: Yang Le Date: Mon, 5 Feb 2024 18:06:23 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20support=20klusterlet=20priorityclas?= =?UTF-8?q?s=20(#319)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yang Le --- ...operator.open-cluster-management.io_klusterlets.crd.yaml | 3 +++ ...operator.open-cluster-management.io_klusterlets.crd.yaml | 5 +++++ operator/v1/types_klusterlet.go | 6 ++++++ operator/v1/zz_generated.swagger_doc_generated.go | 1 + 4 files changed, 15 insertions(+) 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 071da4342..c6c2b162a 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 @@ -111,6 +111,9 @@ spec: value: description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. type: string + priorityClassName: + description: PriorityClassName is the name of the PriorityClass that will be used by the deployed klusterlet agent. It will be ignored when the PriorityClass/v1 API is not available on the managed cluster. + type: string registrationConfiguration: description: RegistrationConfiguration contains the configuration of registration type: object 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 ad6e6434b..4896f275f 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 @@ -172,6 +172,11 @@ spec: type: object type: array type: object + priorityClassName: + description: PriorityClassName is the name of the PriorityClass that + will be used by the deployed klusterlet agent. It will be ignored + when the PriorityClass/v1 API is not available on the managed cluster. + type: string registrationConfiguration: description: RegistrationConfiguration contains the configuration of registration diff --git a/operator/v1/types_klusterlet.go b/operator/v1/types_klusterlet.go index bef65984f..96c51fdb6 100644 --- a/operator/v1/types_klusterlet.go +++ b/operator/v1/types_klusterlet.go @@ -93,6 +93,12 @@ type KlusterletSpec struct { // It applies to all the containers in the deployments. // +optional ResourceRequirement *ResourceRequirement `json:"resourceRequirement,omitempty"` + + // PriorityClassName is the name of the PriorityClass that will be used by the + // deployed klusterlet agent. It will be ignored when the PriorityClass/v1 API + // is not available on the managed cluster. + // +optional + PriorityClassName string `json:"priorityClassName,omitempty"` } // ServerURL represents the apiserver url and ca bundle that is accessible externally diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go index 8d8a14f20..373b77999 100644 --- a/operator/v1/zz_generated.swagger_doc_generated.go +++ b/operator/v1/zz_generated.swagger_doc_generated.go @@ -215,6 +215,7 @@ var map_KlusterletSpec = map[string]string{ "workConfiguration": "WorkConfiguration contains the configuration of work", "hubApiServerHostAlias": "HubApiServerHostAlias contains the host alias for hub api server. registration-agent and work-agent will use it to communicate with hub api server.", "resourceRequirement": "ResourceRequirement specify QoS classes of deployments managed by klusterlet. It applies to all the containers in the deployments.", + "priorityClassName": "PriorityClassName is the name of the PriorityClass that will be used by the deployed klusterlet agent. It will be ignored when the PriorityClass/v1 API is not available on the managed cluster.", } func (KlusterletSpec) SwaggerDoc() map[string]string {