mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-06 20:51:30 +02:00
* 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>
24 lines
649 B
Go
24 lines
649 B
Go
package app
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
|
|
"github.com/helmfile/helmfile/pkg/envvar"
|
|
)
|
|
|
|
const (
|
|
DefaultHelmfile = "helmfile.yaml"
|
|
DeprecatedHelmfile = "charts.yaml"
|
|
DefaultHelmfileDirectory = "helmfile.d"
|
|
ExperimentalSelectorExplicit = "explicit-selector-inheritance" // value to remove default selector inheritance to sub-helmfiles and use the explicit one
|
|
)
|
|
|
|
func experimentalModeEnabled() bool {
|
|
return os.Getenv(envvar.Experimental) == "true"
|
|
}
|
|
|
|
func isExplicitSelectorInheritanceEnabled() bool {
|
|
return experimentalModeEnabled() || strings.Contains(os.Getenv(envvar.Experimental), ExperimentalSelectorExplicit)
|
|
}
|