From 0cdf22243169a9e5c6e0ecb351a8b841584d99b8 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Fri, 29 Jul 2022 13:20:04 +0400 Subject: [PATCH] fix: retry Conflict errors when upgrading k8s manifests Fixes #5985 Signed-off-by: Andrey Smirnov --- pkg/cluster/kubernetes/talos_managed.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cluster/kubernetes/talos_managed.go b/pkg/cluster/kubernetes/talos_managed.go index 2be35bc8c5..8b551f05ad 100644 --- a/pkg/cluster/kubernetes/talos_managed.go +++ b/pkg/cluster/kubernetes/talos_managed.go @@ -518,7 +518,7 @@ func syncManifests(ctx context.Context, objects []*unstructured.Unstructured, cl err = retry.Constant(3*time.Minute, retry.WithUnits(10*time.Second), retry.WithErrorLogging(true)).RetryWithContext(ctx, func(ctx context.Context) error { resp, diff, skipped, err = updateManifest(ctx, mapper, k8sClient, obj, options.DryRun) - if kubernetes.IsRetryableError(err) { + if kubernetes.IsRetryableError(err) || apierrors.IsConflict(err) { return retry.ExpectedError(err) }