Skip to content

Commit

Permalink
fix: #4081 (#4083)
Browse files Browse the repository at this point in the history
Signed-off-by: fengxsong <[email protected]>
  • Loading branch information
fengxsong authored and [email protected] committed Oct 12, 2023
1 parent b8affb0 commit c4f7b52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/apply/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/labring/sealos/pkg/types/v1beta1"
"github.com/labring/sealos/pkg/utils/iputils"
"github.com/labring/sealos/pkg/utils/logger"
"github.com/labring/sealos/pkg/utils/maps"
)

func NewClusterFromGenArgs(cmd *cobra.Command, args *RunArgs, imageNames []string) ([]byte, error) {
Expand Down Expand Up @@ -57,6 +58,7 @@ func NewClusterFromGenArgs(cmd *cobra.Command, args *RunArgs, imageNames []strin
if !img.IsRootFs() {
return nil, fmt.Errorf("the first image %s is not a rootfs type image", imageNames[0])
}
img.Env = maps.Merge(img.Env, maps.FromSlice(cluster.Spec.Env))
cluster.Status.Mounts = append(cluster.Status.Mounts, *img)

cfg, err := factory.NewRuntimeConfig(cluster.GetDistribution())
Expand Down

0 comments on commit c4f7b52

Please sign in to comment.