Skip to content

Commit

Permalink
Retry for ProvisioningRequests KEP
Browse files Browse the repository at this point in the history
  • Loading branch information
mimowo committed Nov 21, 2023
1 parent 1ea3312 commit cde3c0e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions keps/1136-provisioning-request-support/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ If the `ProvisioningRequest` fails, fail the `AdmissionCheck`.
the provisioning request should also be deleted (the last one can be achieved via
OwnerReference).

* Retry ProvisioningRequests with respect to the `RetryConfig` configuration in
the `ProvisioningRequestConfig`. For each attempt a new provisioning request is
created with the suffix indicating the attempt number. The attempt number will
also be kept in ProvisioningRequest annotation:
`kueue.x-k8s.io/provisioning-request-attempt`. The corresponding admission
check will remain in the `Pending` state until the retries end.

The definition of `ProvisioningRequestConfig` is relatively simple and is based on
what can be set in `ProvisioningRequest`.

Expand Down Expand Up @@ -146,6 +153,26 @@ type ProvisioningRequestConfigSpec struct {
// +listType=set
// +kubebuilder:validation:MaxItems=100
ManagedResources []corev1.ResourceName `json:"managedResources,omitempty"`

// RetryConfig defines the retry configuration for a provisioning request
//
// +optional
RetryConfig *ProvisioningRequestRetryConfig `json:"retryConfig,omitempty"`
}

// ProvisioningRequestRetryConfig defines the retry configuration for the provisioning requests
type ProvisioningRequestRetryConfig struct {
// MaxRetries indicates the maximal number of retries for recreating the provisioning request.
//
// +optional
// +kubebuilder:default=3
MaxRetries *int32 `json:"maxRetries,omitempty"`

// DefaultBackoffSeconds indicates the default backoff in seconds. The intervals
// between consecutive attempts are determined by expotential growth up to 30min.
// +optional
// +kubebuilder:default=60
DefaultBackoffSeconds *int32 `json:"minBackoffSeconds,omitempty"`
}
```

Expand Down

0 comments on commit cde3c0e

Please sign in to comment.