Skip to content

Commit

Permalink
fix(update): timeout increased for watcher [EE-6580] (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhat83 authored Jan 23, 2024
1 parent d4607c2 commit 902f489
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kubernetes/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 902f489

Please sign in to comment.