Skip to content

Commit

Permalink
fix: Fix diff after downscale
Browse files Browse the repository at this point in the history
  • Loading branch information
codablock committed Sep 20, 2022
1 parent 834c11f commit e6c028c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/deployment/commands/downscale.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
utils2 "github.com/kluctl/kluctl/v2/pkg/deployment/utils"
"github.com/kluctl/kluctl/v2/pkg/k8s"
"github.com/kluctl/kluctl/v2/pkg/types"
k8s2 "github.com/kluctl/kluctl/v2/pkg/types/k8s"
"github.com/kluctl/kluctl/v2/pkg/utils/uo"
"sync"
)
Expand Down Expand Up @@ -34,8 +33,6 @@ func (cmd *DownscaleCommand) Run(ctx context.Context, k *k8s.K8sCluster) (*types

ad := utils2.NewApplyDeploymentsUtil(ctx, dew, cmd.c.Deployments, ru, k, &utils2.ApplyUtilOptions{})

appliedObjects := make(map[k8s2.ObjectRef]*uo.UnstructuredObject)

for _, d := range cmd.c.Deployments {
if !d.CheckInclusionForDeploy() {
continue
Expand All @@ -62,7 +59,7 @@ func (cmd *DownscaleCommand) Run(ctx context.Context, k *k8s.K8sCluster) (*types
}
wg.Wait()

du := utils2.NewDiffUtil(dew, cmd.c.Deployments, ru, appliedObjects)
du := utils2.NewDiffUtil(dew, cmd.c.Deployments, ru, ad.GetAppliedObjectsMap())
du.Diff()

return &types.CommandResult{
Expand Down

0 comments on commit e6c028c

Please sign in to comment.