Skip to content

Commit

Permalink
fix: create new container mount when force override (#4068)
Browse files Browse the repository at this point in the history
Signed-off-by: fengxsong <fengxsong@outlook.com>
  • Loading branch information
fengxsong committed Oct 11, 2023
1 parent 0362392 commit c79c1b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/apply/processor/install.go
Expand Up @@ -147,11 +147,12 @@ func (c *InstallProcessor) PreProcess(cluster *v2.Cluster) error {
if !ForceOverride {
continue
}
ctrName = mount.Name
logger.Debug("trying to override app %s", img)
} else {
ctrName = rand.Generator(8)
if err := c.Buildah.Delete(mount.Name); err != nil {
return err
}
}
ctrName = rand.Generator(8)
cluster.Spec.Image = stringsutil.Merge(cluster.Spec.Image, img)
bderInfo, err := c.Buildah.Create(ctrName, img)
if err != nil {
Expand Down

0 comments on commit c79c1b2

Please sign in to comment.