Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: issue #4536 #4540

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 5 additions & 13 deletions pkg/apply/applydrivers/apply_drivers_default.go
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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