add skip-crds flag support

Signed-off-by: George Kaz <egeorgekaz@gmail.com>
This commit is contained in:
George Kaz
2021-07-20 19:21:44 +01:00
parent 8dba329407
commit e482a144c1
5 changed files with 32 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ type Upgrade struct {
cleanupOnFail bool
certs *repoCerts
createNamespace bool
skipCrds bool
cmd cmd
}
@@ -47,6 +48,7 @@ func NewUpgrade(cfg env.Config) *Upgrade {
cleanupOnFail: cfg.CleanupOnFail,
certs: newRepoCerts(cfg),
createNamespace: cfg.CreateNamespace,
skipCrds: cfg.SkipCrds,
}
}
@@ -100,6 +102,9 @@ func (u *Upgrade) Prepare() error {
if u.createNamespace {
args = append(args, "--create-namespace")
}
if u.skipCrds {
args = append(args, "--skip-crds")
}
for _, vFile := range u.valuesFiles {
args = append(args, "--values", vFile)
}