mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
Updated the comment of IsRestartableInitContainer(...)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user