Skip to content

Commit

Permalink
fix: issue #4536 (#4540)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengxsong committed Feb 28, 2024
1 parent 6d73bbf commit d334b54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
18 changes: 5 additions & 13 deletions pkg/apply/applydrivers/apply_drivers_default.go
Expand Up @@ -22,12 +22,10 @@ import (
"strconv"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/version"

"golang.org/x/sync/errgroup"

"github.com/labring/sealos/pkg/apply/processor"
"github.com/labring/sealos/pkg/client-go/kubernetes"
"github.com/labring/sealos/pkg/clusterfile"
"github.com/labring/sealos/pkg/constants"
"github.com/labring/sealos/pkg/exec"
Expand Down Expand Up @@ -76,12 +74,10 @@ func NewDefaultScaleApplier(ctx context.Context, current, cluster *v2.Cluster) (

type Applier struct {
context.Context
ClusterDesired *v2.Cluster
ClusterCurrent *v2.Cluster
ClusterFile clusterfile.Interface
Client kubernetes.Client
CurrentClusterInfo *version.Info
RunNewImages []string
ClusterDesired *v2.Cluster
ClusterCurrent *v2.Cluster
ClusterFile clusterfile.Interface
RunNewImages []string
}

func (c *Applier) Apply() error {
Expand Down Expand Up @@ -221,11 +217,7 @@ func (c *Applier) installApp(images []string) error {
if err != nil {
return err
}
err = installProcessor.Execute(c.ClusterDesired)
if err != nil {
return err
}
return nil
return installProcessor.Execute(c.ClusterDesired)
}

func (c *Applier) scaleCluster(mj, md, nj, nd []string) error {
Expand Down
1 change: 1 addition & 0 deletions pkg/apply/processor/interface.go
Expand Up @@ -229,6 +229,7 @@ func MountClusterImages(bdah buildah.Interface, cluster *v2.Cluster, skipApp boo
return err
}
if idx >= 0 {
mount.Env = maps.Merge(mount.Env, cluster.Status.Mounts[idx].Env)
cluster.Status.Mounts[idx] = *mount
} else {
cluster.Status.Mounts = append(cluster.Status.Mounts, *mount)
Expand Down

0 comments on commit d334b54

Please sign in to comment.