Updated the comment of IsRestartableInitContainer(...)

This commit is contained in:
vivzbansal 2024-11-07 22:05:15 +00:00
parent 0548756f06
commit cf8ee421f1
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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