fix: nil panic for the latestDepl.Name if not return in the for cycle (#2682)
Signed-off-by: saltbo <saltbo@foxmail.com> Signed-off-by: saltbo <saltbo@foxmail.com>
This commit is contained in:
@@ -139,7 +139,7 @@ func (cn *Container) waitForDeploy(ctx context.Context, depl *appsv1.Deployment,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < specializationTimeout; i++ {
|
for i := 0; i < specializationTimeout; i++ {
|
||||||
latestDepl, err := cn.kubernetesClient.AppsV1().Deployments(depl.ObjectMeta.Namespace).Get(ctx, depl.Name, metav1.GetOptions{})
|
latestDepl, err = cn.kubernetesClient.AppsV1().Deployments(depl.ObjectMeta.Namespace).Get(ctx, depl.Name, metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user