-
Notifications
You must be signed in to change notification settings - Fork 885
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce a new API named WorkloadRebalancer to support rescheduling.
Signed-off-by: chaosi-zju <[email protected]>
- Loading branch information
1 parent
aded7c0
commit e66a375
Showing
38 changed files
with
2,895 additions
and
13 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
117 changes: 117 additions & 0 deletions
117
charts/karmada/_crds/bases/apps/apps.karmada.io_workloadrebalancers.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.13.0 | ||
name: workloadrebalancers.apps.karmada.io | ||
spec: | ||
group: apps.karmada.io | ||
names: | ||
categories: | ||
- karmada-io | ||
kind: WorkloadRebalancer | ||
listKind: WorkloadRebalancerList | ||
plural: workloadrebalancers | ||
shortNames: | ||
- wr | ||
singular: workloadrebalancer | ||
scope: Cluster | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: "WorkloadRebalancer represents the desired behavior and status | ||
of a job which can enforces a rescheduling. \n Notes: make sure the clocks | ||
of controller-manager and scheduler are synchronized when using this API." | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: Spec represents the specification of the desired behavior | ||
of WorkloadRebalancer. | ||
properties: | ||
workloads: | ||
description: Workloads used to specify the list of expected resource. | ||
Nil or empty list is not allowed. | ||
items: | ||
description: Workload the expected resource. | ||
properties: | ||
apiVersion: | ||
description: APIVersion represents the API version of the target | ||
resource. | ||
type: string | ||
kind: | ||
description: Kind represents the Kind of the target resource. | ||
type: string | ||
name: | ||
description: Name of the target resource. | ||
type: string | ||
namespace: | ||
description: Namespace of the target resource. Default is empty, | ||
which means it is a non-namespacescoped resource. | ||
type: string | ||
required: | ||
- apiVersion | ||
- kind | ||
- name | ||
type: object | ||
minItems: 1 | ||
type: array | ||
required: | ||
- workloads | ||
type: object | ||
status: | ||
description: Status represents the status of WorkloadRebalancer. | ||
properties: | ||
observedWorkloads: | ||
description: ObservedWorkloads contains information about the execution | ||
states and messages of target resources. | ||
items: | ||
description: ObservedWorkload the observed resource. | ||
properties: | ||
apiVersion: | ||
description: APIVersion represents the API version of the target | ||
resource. | ||
type: string | ||
kind: | ||
description: Kind represents the Kind of the target resource. | ||
type: string | ||
name: | ||
description: Name of the target resource. | ||
type: string | ||
namespace: | ||
description: Namespace of the target resource. Default is empty, | ||
which means it is a non-namespacescoped resource. | ||
type: string | ||
reason: | ||
description: Reason represents a machine-readable description | ||
of why this workload failed. | ||
type: string | ||
state: | ||
description: State the observed state of resource. | ||
type: string | ||
required: | ||
- apiVersion | ||
- kind | ||
- name | ||
type: object | ||
type: array | ||
type: object | ||
required: | ||
- spec | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
Copyright 2024 The Karmada Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
// Package v1alpha1 is the v1alpha1 version of the API. | ||
// +k8s:deepcopy-gen=package,register | ||
// +k8s:openapi-gen=true | ||
// +groupName=apps.karmada.io | ||
package v1alpha1 |
Oops, something went wrong.