mirror of
https://github.com/foomo/squadron.git
synced 2025-10-16 12:35:42 +00:00
refactor: move values to global scope
This commit is contained in:
parent
d16e6e442f
commit
e43d200045
@ -3,7 +3,6 @@ package config
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"sort"
|
||||
@ -112,8 +111,8 @@ func (u *Unit) Template(ctx context.Context, name, squadron, unit, namespace str
|
||||
Args("--dependency-update").
|
||||
Args("--namespace", namespace).
|
||||
Args("--debug").
|
||||
Args("--set", fmt.Sprintf("squadron=%s", squadron)).
|
||||
Args("--set", fmt.Sprintf("unit=%s", unit)).
|
||||
Args("--set", "global.foomo.squadron.name="+squadron).
|
||||
Args("--set", "global.foomo.squadron.unit="+unit).
|
||||
Args(u.PostRendererArgs()...).
|
||||
Args("--values", "-").
|
||||
Args(helmArgs...)
|
||||
|
||||
@ -411,8 +411,8 @@ func (sq *Squadron) Diff(ctx context.Context, helmArgs []string, parallel int) e
|
||||
cmd := exec.CommandContext(ctx, "helm", "upgrade", name,
|
||||
"--install",
|
||||
"--namespace", namespace,
|
||||
"--set", fmt.Sprintf("squadron=%s", key),
|
||||
"--set", fmt.Sprintf("unit=%s", k),
|
||||
"--set", "global.foomo.squadron.name="+key,
|
||||
"--set", "global.foomo.squadron.unit="+k,
|
||||
"--hide-notes",
|
||||
"--values", "-",
|
||||
"--dry-run",
|
||||
@ -687,8 +687,8 @@ func (sq *Squadron) Up(ctx context.Context, helmArgs []string, username, version
|
||||
Stdin(bytes.NewReader(valueBytes)).
|
||||
Stdout(os.Stdout).
|
||||
Args("upgrade", name, "--install").
|
||||
Args("--set", fmt.Sprintf("squadron=%s", key)).
|
||||
Args("--set", fmt.Sprintf("unit=%s", k)).
|
||||
Args("--set", "global.foomo.squadron.name="+key).
|
||||
Args("--set", "global.foomo.squadron.unit="+k).
|
||||
Args("--description", string(description)).
|
||||
Args("--namespace", namespace).
|
||||
Args("--dependency-update").
|
||||
|
||||
Loading…
Reference in New Issue
Block a user