mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Updated the comment of IsRestartableInitContainer(...)
This commit is contained in:
parent
0548756f06
commit
cf8ee421f1
@ -1227,8 +1227,9 @@ func hasInvalidLabelValueInAffinitySelector(spec *api.PodSpec) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRestartableInitContainer returns true if the initContainer has
|
||||
// ContainerRestartPolicyAlways.
|
||||
// IsRestartableInitContainer returns true if the container has ContainerRestartPolicyAlways.
|
||||
// This function is not checking if the container passed to it is indeed an init container.
|
||||
// It is just checking if the container restart policy has been set to always.
|
||||
func IsRestartableInitContainer(initContainer *api.Container) bool {
|
||||
if initContainer == nil || initContainer.RestartPolicy == nil {
|
||||
return false
|
||||
|
@ -407,8 +407,9 @@ func UpdatePodCondition(status *v1.PodStatus, condition *v1.PodCondition) bool {
|
||||
return !isEqual
|
||||
}
|
||||
|
||||
// IsRestartableInitContainer returns true if the initContainer has
|
||||
// ContainerRestartPolicyAlways.
|
||||
// IsRestartableInitContainer returns true if the container has ContainerRestartPolicyAlways.
|
||||
// This function is not checking if the container passed to it is indeed an init container.
|
||||
// It is just checking if the container restart policy has been set to always.
|
||||
func IsRestartableInitContainer(initContainer *v1.Container) bool {
|
||||
if initContainer == nil || initContainer.RestartPolicy == nil {
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user