WorkloadRebalancer v1alpha1
apiVersion: apps.karmada.io/v1alpha1
import "github.com/karmada-io/karmada/pkg/apis/apps/v1alpha1"
WorkloadRebalancer
WorkloadRebalancer represents the desired behavior and status of a job which can enforces a resource rebalance.
apiVersion: apps.karmada.io/v1alpha1
kind: WorkloadRebalancer
metadata (ObjectMeta)
spec (WorkloadRebalancerSpec), required
Spec represents the specification of the desired behavior of WorkloadRebalancer.
status (WorkloadRebalancerStatus)
Status represents the status of WorkloadRebalancer.
WorkloadRebalancerSpec
WorkloadRebalancerSpec represents the specification of the desired behavior of Reschedule.
workloads ([]ObjectReference), required
Workloads used to specify the list of expected resource. Nil or empty list is not allowed.
ObjectReference the expected resource.
workloads.apiVersion (string), required
APIVersion represents the API version of the target resource.
workloads.kind (string), required
Kind represents the Kind of the target resource.
workloads.name (string), required
Name of the target resource.
workloads.namespace (string)
Namespace of the target resource. Default is empty, which means it is a non-namespacescoped resource.
ttlSecondsAfterFinished (int32)
TTLSecondsAfterFinished limits the lifetime of a WorkloadRebalancer that has finished execution (means each target workload is finished with result of Successful or Failed). If this field is set, ttlSecondsAfterFinished after the WorkloadRebalancer finishes, it is eligible to be automatically deleted. If this field is unset, the WorkloadRebalancer won't be automatically deleted. If this field is set to zero, the WorkloadRebalancer becomes eligible to be deleted immediately after it finishes.
WorkloadRebalancerStatus
WorkloadRebalancerStatus contains information about the current status of a WorkloadRebalancer updated periodically by schedule trigger controller.
finishTime (Time)
FinishTime represents the finish time of rebalancer.
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
observedGeneration (int64)
ObservedGeneration is the generation(.metadata.generation) observed by the controller. If ObservedGeneration is less than the generation in metadata means the controller hasn't confirmed the rebalance result or hasn't done the rebalance yet.
observedWorkloads ([]ObservedWorkload)
ObservedWorkloads contains information about the execution states and messages of target resources.
ObservedWorkload the observed resource.
observedWorkloads.workload (ObjectReference), required
Workload the observed resource.
ObjectReference the expected resource.
observedWorkloads.workload.apiVersion (string), required
APIVersion represents the API version of the target resource.
observedWorkloads.workload.kind (string), required
Kind represents the Kind of the target resource.
observedWorkloads.workload.name (string), required
Name of the target resource.
observedWorkloads.workload.namespace (string)
Namespace of the target resource. Default is empty, which means it is a non-namespacescoped resource.
observedWorkloads.reason (string)
Reason represents a machine-readable description of why this resource rebalanced failed.
observedWorkloads.result (string)
Result the observed rebalance result of resource.
WorkloadRebalancerList
WorkloadRebalancerList contains a list of WorkloadRebalancer
apiVersion: apps.karmada.io/v1alpha1
kind: WorkloadRebalancerList
metadata (ListMeta)
items ([][WorkloadRebalancer](../app-resources/workload-rebalancer-v1alpha1#workloadrebalancer)), required
Items holds a list of WorkloadRebalancer.
Operations
get
read the specified WorkloadRebalancer
HTTP Request
GET /apis/apps.karmada.io/v1alpha1/workloadrebalancers/{name}
Parameters
name (in path): string, required
name of the WorkloadRebalancer
pretty (in query): string
Response
200 (WorkloadRebalancer): OK
get
read status of the specified WorkloadRebalancer
HTTP Request
GET /apis/apps.karmada.io/v1alpha1/workloadrebalancers/{name}/status
Parameters
name (in path): string, required
name of the WorkloadRebalancer
pretty (in query): string
Response
200 (WorkloadRebalancer): OK
list
list or watch objects of kind WorkloadRebalancer
HTTP Request
GET /apis/apps.karmada.io/v1alpha1/workloadrebalancers
Parameters
allowWatchBookmarks (in query): boolean
continue (in query): string
fieldSelector (in query): string
labelSelector (in query): string
limit (in query): integer
pretty (in query): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
watch (in query): boolean
Response
200 (WorkloadRebalancerList): OK
create
create a WorkloadRebalancer
HTTP Request
POST /apis/apps.karmada.io/v1alpha1/workloadrebalancers
Parameters
- body: WorkloadRebalancer, required
dryRun (in query): string
fieldManager (in query): string
fieldValidation (in query): string
pretty (in query): string
Response
200 (WorkloadRebalancer): OK
201 (WorkloadRebalancer): Created
202 (WorkloadRebalancer): Accepted
update
replace the specified WorkloadRebalancer
HTTP Request
PUT /apis/apps.karmada.io/v1alpha1/workloadrebalancers/{name}
Parameters
name (in path): string, required
name of the WorkloadRebalancer
body: WorkloadRebalancer, required
dryRun (in query): string
fieldManager (in query): string
fieldValidation (in query): string
pretty (in query): string
Response
200 (WorkloadRebalancer): OK
201 (WorkloadRebalancer): Created
update
replace status of the specified WorkloadRebalancer
HTTP Request
PUT /apis/apps.karmada.io/v1alpha1/workloadrebalancers/{name}/status
Parameters
name (in path): string, required
name of the WorkloadRebalancer
body: WorkloadRebalancer, required
dryRun (in query): string
fieldManager (in query): string
fieldValidation (in query): string
pretty (in query): string
Response
200 (WorkloadRebalancer): OK
201 (WorkloadRebalancer): Created
patch
partially update the specified WorkloadRebalancer
HTTP Request
PATCH /apis/apps.karmada.io/v1alpha1/workloadrebalancers/{name}
Parameters
name (in path): string, required
name of the WorkloadRebalancer
body: Patch, required
dryRun (in query): string
fieldManager (in query): string
fieldValidation (in query): string
force (in query): boolean
pretty (in query): string
Response
200 (WorkloadRebalancer): OK
201 (WorkloadRebalancer): Created
patch
partially update status of the specified WorkloadRebalancer
HTTP Request
PATCH /apis/apps.karmada.io/v1alpha1/workloadrebalancers/{name}/status
Parameters
name (in path): string, required
name of the WorkloadRebalancer
body: Patch, required
dryRun (in query): string
fieldManager (in query): string
fieldValidation (in query): string
force (in query): boolean
pretty (in query): string
Response
200 (WorkloadRebalancer): OK
201 (WorkloadRebalancer): Created
delete
delete a WorkloadRebalancer
HTTP Request
DELETE /apis/apps.karmada.io/v1alpha1/workloadrebalancers/{name}
Parameters
name (in path): string, required
name of the WorkloadRebalancer
body: DeleteOptions
dryRun (in query): string
gracePeriodSeconds (in query): integer
pretty (in query): string
propagationPolicy (in query): string
Response
200 (Status): OK
202 (Status): Accepted
deletecollection
delete collection of WorkloadRebalancer
HTTP Request
DELETE /apis/apps.karmada.io/v1alpha1/workloadrebalancers
Parameters
- body: DeleteOptions
continue (in query): string
dryRun (in query): string
fieldSelector (in query): string
gracePeriodSeconds (in query): integer
labelSelector (in query): string
limit (in query): integer
pretty (in query): string
propagationPolicy (in query): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
Response
200 (Status): OK