Use go-getter with secrets as well (#560)

* Use go-getter with secrets as well

Signed-off-by: Quan TRAN <account@itscaro.me>
This commit is contained in:
Quan TRAN
2022-12-09 07:46:28 +08:00
committed by GitHub
parent f7b3fb4432
commit 398c812e49
9 changed files with 202 additions and 28 deletions
+7 -1
View File
@@ -293,9 +293,15 @@ func (c *StateCreator) scatterGatherEnvSecretFiles(st *HelmState, envSecretFiles
},
func(id int) {
for secret := range secrets {
urlOrPath := secret.path
localPath, err := c.remote.Locate(urlOrPath)
if err == nil {
urlOrPath = localPath
}
release := &ReleaseSpec{}
flags := st.appendConnectionFlags([]string{}, helm, release)
decFile, err := helm.DecryptSecret(st.createHelmContext(release, 0), secret.path, flags...)
decFile, err := helm.DecryptSecret(st.createHelmContext(release, 0), urlOrPath, flags...)
if err != nil {
results <- secretResult{secret.id, nil, err, secret.path}
continue