Skip to content

Commit

Permalink
featureGate: EnableKruiseToRestart
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdsteelRail committed Jul 16, 2024
1 parent 0f88a43 commit 70b01ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pkg/controllers/operationjob/operationjob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ func AddToMgr(mgr ctrl.Manager, r reconcile.Reconciler) error {
return err
}

// Watch for changes to ContainerRecreateRequest if EnableKruiseToRestart (enabled by default)
// Add '--feature-gates=EnableKruiseToRestart=false' to container args to disable kruise restart method
// Add '--feature-gates=EnableKruiseToRestart=true' to container args to enable kruise restart, default false
if feature.DefaultFeatureGate.Enabled(features.EnableKruiseToRestart) {
err = c.Watch(&source.Kind{Type: &kruisev1alpha1.ContainerRecreateRequest{}}, &handler.EnqueueRequestForOwner{
IsController: true,
Expand Down
2 changes: 1 addition & 1 deletion pkg/features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
GraceDeleteWebhook featuregate.Feature = "GraceDeleteWebhook"
// ReclaimPodToDelete enables reclaim of collaset.spec.scaleStrategy.podToDelete
ReclaimPodToDelete featuregate.Feature = "ReclaimPodToDelete"
// EnableKruiseToRestart disable kruise to recreate containers
// EnableKruiseToRestart enable kruise to recreate containers
EnableKruiseToRestart featuregate.Feature = "EnableKruiseToRestart"
)

Expand Down

0 comments on commit 70b01ff

Please sign in to comment.