Skip to content

Commit dc81fc3

Browse files
committed
feat(nelm): skip removal of resources with missing/incorrect release annotations and labels
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
1 parent b642102 commit dc81fc3

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

cmd/werf/bundle/apply/apply.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ func runFailureDeployPlan(ctx context.Context, failedPlan *pln.Plan, taskStore *
702702
failurePlanBuilder := plnbuilder.NewDeployFailurePlanBuilder(
703703
failedPlan,
704704
taskStore,
705+
resProcessor.DeployableReleaseNamespaceInfo(),
705706
resProcessor.DeployableHookResourcesInfos(),
706707
resProcessor.DeployableGeneralResourcesInfos(),
707708
newRel,

cmd/werf/converge/converge.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,7 @@ func runFailureDeployPlan(ctx context.Context, failedPlan *pln.Plan, taskStore *
971971
failurePlanBuilder := plnbuilder.NewDeployFailurePlanBuilder(
972972
failedPlan,
973973
taskStore,
974+
resProcessor.DeployableReleaseNamespaceInfo(),
974975
resProcessor.DeployableHookResourcesInfos(),
975976
resProcessor.DeployableGeneralResourcesInfos(),
976977
newRel,

cmd/werf/plan/plan.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ func run(ctx context.Context, containerBackend container_backend.ContainerBacken
651651

652652
log.Default.Info(ctx, "Calculating planned changes")
653653
createdChanges, recreatedChanges, updatedChanges, appliedChanges, deletedChanges, planChangesPlanned := resrcchangcalc.CalculatePlannedChanges(
654+
releaseName,
654655
resProcessor.DeployableReleaseNamespaceInfo(),
655656
resProcessor.DeployableStandaloneCRDsInfos(),
656657
resProcessor.DeployableHookResourcesInfos(),

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ require (
6565
github.com/werf/kubedog v0.12.4-0.20240329141850-9e5c458d11bb
6666
github.com/werf/lockgate v0.1.1
6767
github.com/werf/logboek v0.6.1
68-
github.com/werf/nelm v0.0.0-20240404150146-9089ec2335f3
68+
github.com/werf/nelm v0.0.0-20240404160353-5fd7acdf2977
6969
go.opentelemetry.io/otel v1.24.0
7070
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0
7171
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,8 +1539,8 @@ github.com/werf/lockgate v0.1.1 h1:S400JFYjtWfE4i4LY9FA8zx0fMdfui9DPrBiTciCrx4=
15391539
github.com/werf/lockgate v0.1.1/go.mod h1:0yIFSLq9ausy6ejNxF5uUBf/Ib6daMAfXuCaTMZJzIE=
15401540
github.com/werf/logboek v0.6.1 h1:oEe6FkmlKg0z0n80oZjLplj6sXcBeLleCkjfOOZEL2g=
15411541
github.com/werf/logboek v0.6.1/go.mod h1:Gez5J4bxekyr6MxTmIJyId1F61rpO+0/V4vjCIEIZmk=
1542-
github.com/werf/nelm v0.0.0-20240404150146-9089ec2335f3 h1:OXX0x0Mpor4w/m0/P0+ZyFE2hNMk4Csu+NnPX4mr3+E=
1543-
github.com/werf/nelm v0.0.0-20240404150146-9089ec2335f3/go.mod h1:y1M05nA04Zsufzz86NqV6+U8Ufhpgpkv5b3ntz35/6M=
1542+
github.com/werf/nelm v0.0.0-20240404160353-5fd7acdf2977 h1:qN574RLc22ufMesPdyvBTndHFaIRvOkLJHe5DQqmC2g=
1543+
github.com/werf/nelm v0.0.0-20240404160353-5fd7acdf2977/go.mod h1:y1M05nA04Zsufzz86NqV6+U8Ufhpgpkv5b3ntz35/6M=
15441544
github.com/xanzy/go-gitlab v0.31.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug=
15451545
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
15461546
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=

0 commit comments

Comments
 (0)