mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 15:14:04 +02:00
Introduce DISABLE_INSECURE_FEATURES to disable insecure command executions (#1)
* introduce DISABLE_INSECURE_FEATURES to disable insecure executions Signed-off-by: Quan TRAN <account@itscaro.me> * disable remote sources when DISABLE_INSECURE_FEATURES is set to "true" Signed-off-by: Quan TRAN <account@itscaro.me> * refactor envvar package Signed-off-by: Quan TRAN <account@itscaro.me> * (test) fix test fixtures Signed-off-by: Quan TRAN <account@itscaro.me> * use absolute path to avoid unit test failure Signed-off-by: Quan TRAN <account@itscaro.me> * Fix conflicts Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
co-authored by
Yusuke Kuoka
parent
789af92c09
commit
577f54af7a
@@ -12,6 +12,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/Masterminds/semver/v3"
|
||||
"github.com/helmfile/helmfile/pkg/envvar"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
)
|
||||
@@ -65,7 +66,7 @@ func parseHelmVersion(versionStr string) (semver.Version, error) {
|
||||
}
|
||||
|
||||
// Support explicit helm3 opt-in via environment variable
|
||||
if os.Getenv("HELMFILE_HELM3") != "" && ver.Major() < 3 {
|
||||
if os.Getenv(envvar.Helm3) != "" && ver.Major() < 3 {
|
||||
return *semver.MustParse("v3.0.0"), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user