mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
Updated the comment of IsRestartableInitContainer(...)
This commit is contained in:
@@ -1227,8 +1227,9 @@ func hasInvalidLabelValueInAffinitySelector(spec *api.PodSpec) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsRestartableInitContainer returns true if the initContainer has
|
// IsRestartableInitContainer returns true if the container has ContainerRestartPolicyAlways.
|
||||||
// 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 {
|
func IsRestartableInitContainer(initContainer *api.Container) bool {
|
||||||
if initContainer == nil || initContainer.RestartPolicy == nil {
|
if initContainer == nil || initContainer.RestartPolicy == nil {
|
||||||
return false
|
return false
|
||||||
|
@@ -407,8 +407,9 @@ func UpdatePodCondition(status *v1.PodStatus, condition *v1.PodCondition) bool {
|
|||||||
return !isEqual
|
return !isEqual
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsRestartableInitContainer returns true if the initContainer has
|
// IsRestartableInitContainer returns true if the container has ContainerRestartPolicyAlways.
|
||||||
// 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 {
|
func IsRestartableInitContainer(initContainer *v1.Container) bool {
|
||||||
if initContainer == nil || initContainer.RestartPolicy == nil {
|
if initContainer == nil || initContainer.RestartPolicy == nil {
|
||||||
return false
|
return false
|
||||||
|
Reference in New Issue
Block a user