Skip to content

Commit

Permalink
feat: remove DeleteOptions to set grace period based on TerminationGr…
Browse files Browse the repository at this point in the history
…acePeriodSeconds (#1147)

Co-authored-by: Ryan Lonergan <[email protected]>
  • Loading branch information
rl0nergan and rlonerga-akamai authored Nov 6, 2024
1 parent 5046944 commit d00903e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/util/retry"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down Expand Up @@ -252,7 +251,7 @@ func performRollingUpdateOnSts(ctx context.Context, podMustRecreate bool, rclien
for _, pod := range podsForUpdate {
l.Info("updating pod", "pod", pod.Name)
// we have to delete pod and wait for it readiness
err := rclient.Delete(ctx, &pod, &client.DeleteOptions{GracePeriodSeconds: ptr.To(int64(30))})
err := rclient.Delete(ctx, &pod)
if err != nil {
return err
}
Expand Down

0 comments on commit d00903e

Please sign in to comment.