Skip to content

Commit

Permalink
UPSTREAM: <carry>: Override termination grace period on annotation
Browse files Browse the repository at this point in the history
openshift-rebase(v1.24):source=b8796c6f7c3
  • Loading branch information
ehashman authored and soltysh committed Aug 22, 2022
1 parent fa28c1e commit 026eeb5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/kubelet/kuberuntime/kuberuntime_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,13 @@ func setTerminationGracePeriod(pod *v1.Pod, containerSpec *v1.Container, contain
}
return *pod.Spec.TerminationGracePeriodSeconds
}

if annotationGracePeriod, found := pod.ObjectMeta.Annotations["unsupported.do-not-use.openshift.io/override-liveness-grace-period-seconds"]; found {
if val, err := strconv.ParseUint(annotationGracePeriod, 10, 64); err == nil && val > 0 {
gracePeriod = int64(val)
}
}

return gracePeriod
}

Expand Down

0 comments on commit 026eeb5

Please sign in to comment.