Use base64 strings for chart repo certs [#74]

This should be a more flexible option since certificates aren't likely
to be part of the actual workspace and may be environment-dependent. It
also mirrors the kube_certificate, which is nice.
This commit is contained in:
Erin Call
2020-01-20 15:40:36 -08:00
parent ee6d8d1724
commit 18313eeb5c
8 changed files with 181 additions and 18 deletions

View File

@@ -22,7 +22,7 @@ type Upgrade struct {
force bool
atomic bool
cleanupOnFail bool
caFile string
certs *repoCerts
cmd cmd
}
@@ -44,7 +44,7 @@ func NewUpgrade(cfg env.Config) *Upgrade {
force: cfg.Force,
atomic: cfg.AtomicUpgrade,
cleanupOnFail: cfg.CleanupOnFail,
caFile: cfg.RepoCAFile,
certs: newRepoCerts(cfg),
}
}
@@ -98,9 +98,7 @@ func (u *Upgrade) Prepare() error {
for _, vFile := range u.valuesFiles {
args = append(args, "--values", vFile)
}
if u.caFile != "" {
args = append(args, "--ca-file", u.caFile)
}
args = append(args, u.certs.flags()...)
args = append(args, u.release, u.chart)
u.cmd = command(helmBin, args...)