From 902f4894ab593b99fe09461c5ffd4f3074253fc6 Mon Sep 17 00:00:00 2001 From: Prabhat Khera <91852476+prabhat-org@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:40:56 +1300 Subject: [PATCH] fix(update): timeout increased for watcher [EE-6580] (#19) --- kubernetes/update.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kubernetes/update.go b/kubernetes/update.go index f25d30f..7bfc30c 100644 --- a/kubernetes/update.go +++ b/kubernetes/update.go @@ -24,6 +24,8 @@ type ( } ) +const fiveMinutes = int64(300) + var errUpdateFailure = errors.New("update failure") func Update(ctx context.Context, cli *kubernetes.Clientset, imageName string, deployment *appV1.Deployment, licenseKey string) error { @@ -149,7 +151,7 @@ func waitForDeployment(ctx context.Context, deployCli v1.DeploymentInterface, de // we will wait 5 seconds before starting to watch time.Sleep(5 * time.Second) - timeoutSeconds := int64(30) + timeoutSeconds := fiveMinutes watcher, err := deployCli.Watch(ctx, metaV1.ListOptions{ FieldSelector: fmt.Sprintf("metadata.name=%s", deploymentName), TimeoutSeconds: &timeoutSeconds,