Add documentation on internal environment variables (#811)
Signed-off-by: Alex Vorona <alex@vorona.com.ua>
This commit is contained in:
		
							parent
							
								
									1f106784d0
								
							
						
					
					
						commit
						e45b1b66c9
					
				|  | @ -116,7 +116,7 @@ func NewRootCmd(globalConfig *config.GlobalOptions) (*cobra.Command, error) { | ||||||
| func setGlobalOptionsForRootCmd(fs *pflag.FlagSet, globalOptions *config.GlobalOptions) { | func setGlobalOptionsForRootCmd(fs *pflag.FlagSet, globalOptions *config.GlobalOptions) { | ||||||
| 	fs.StringVarP(&globalOptions.HelmBinary, "helm-binary", "b", app.DefaultHelmBinary, "Path to the helm binary") | 	fs.StringVarP(&globalOptions.HelmBinary, "helm-binary", "b", app.DefaultHelmBinary, "Path to the helm binary") | ||||||
| 	fs.StringVarP(&globalOptions.File, "file", "f", "", "load config from file or directory. defaults to `helmfile.yaml` or `helmfile.yaml.gotmpl` or `helmfile.d`(means `helmfile.d/*.yaml` or `helmfile.d/*.yaml.gotmpl`) in this preference. Specify - to load the config from the standard input.") | 	fs.StringVarP(&globalOptions.File, "file", "f", "", "load config from file or directory. defaults to `helmfile.yaml` or `helmfile.yaml.gotmpl` or `helmfile.d`(means `helmfile.d/*.yaml` or `helmfile.d/*.yaml.gotmpl`) in this preference. Specify - to load the config from the standard input.") | ||||||
| 	fs.StringVarP(&globalOptions.Environment, "environment", "e", "", `specify the environment name. defaults to "default"`) | 	fs.StringVarP(&globalOptions.Environment, "environment", "e", "", `specify the environment name. Overrides "HELMFILE_ENVIRONMENT" OS environment variable when specified. defaults to "default"`) | ||||||
| 	fs.StringArrayVar(&globalOptions.StateValuesSet, "state-values-set", nil, "set state values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2). Used to override .Values within the helmfile template (not values template).") | 	fs.StringArrayVar(&globalOptions.StateValuesSet, "state-values-set", nil, "set state values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2). Used to override .Values within the helmfile template (not values template).") | ||||||
| 	fs.StringArrayVar(&globalOptions.StateValuesFile, "state-values-file", nil, "specify state values in a YAML file. Used to override .Values within the helmfile template (not values template).") | 	fs.StringArrayVar(&globalOptions.StateValuesFile, "state-values-file", nil, "specify state values in a YAML file. Used to override .Values within the helmfile template (not values template).") | ||||||
| 	fs.BoolVar(&globalOptions.SkipDeps, "skip-deps", false, `skip running "helm repo update" and "helm dependency build"`) | 	fs.BoolVar(&globalOptions.SkipDeps, "skip-deps", false, `skip running "helm repo update" and "helm dependency build"`) | ||||||
|  |  | ||||||
|  | @ -499,6 +499,21 @@ releases: | ||||||
| 
 | 
 | ||||||
| If you wish to treat your enviroment variables as strings always, even if they are boolean or numeric values you can use `{{ env "ENV_NAME" | quote }}` or `"{{ env "ENV_NAME" }}"`. These approaches also work with `requiredEnv`. | If you wish to treat your enviroment variables as strings always, even if they are boolean or numeric values you can use `{{ env "ENV_NAME" | quote }}` or `"{{ env "ENV_NAME" }}"`. These approaches also work with `requiredEnv`. | ||||||
| 
 | 
 | ||||||
|  | ### Useful internal Helmfile environment variables | ||||||
|  | 
 | ||||||
|  | Helmfile uses some OS environment variables to override default behaviour: | ||||||
|  | 
 | ||||||
|  | * `HELMFILE_DISABLE_INSECURE_FEATURES` - disable insecure features, expecting `true` lower case | ||||||
|  | * `HELMFILE_DISABLE_RUNNER_UNIQUE_ID` - disable unique logging ID, expecting any non-empty value | ||||||
|  | * `HELMFILE_SKIP_INSECURE_TEMPLATE_FUNCTIONS` - disable insecure template functions, expecting `true` lower case | ||||||
|  | * `HELMFILE_EXPERIMENTAL` - enable experimental features, expecting `true` lower case | ||||||
|  | * `HELMFILE_ENVIRONMENT` - specify [Helmfile environment](https://helmfile.readthedocs.io/en/latest/#environment), it has lower priority than CLI argument `--environment` | ||||||
|  | * `HELMFILE_TEMPDIR` - specify directory to store temporary files | ||||||
|  | * `HELMFILE_UPGRADE_NOTICE_DISABLED` - expecting any non-empty value to skip the check for the latest version of Helmfile in [helmfile version](https://helmfile.readthedocs.io/en/latest/#version) | ||||||
|  | * `HELMFILE_V1MODE` - Helmfile v0.x behaves like v1.x with `true`, Helmfile v1.x behaves like v0.x with `false` as value | ||||||
|  | * `HELMFILE_GOCCY_GOYAML` - use *goccy/go-yaml* instead of *gopkg.in/yaml.v2*.  It's `false` by default in Helmfile v0.x and `true` by default for Helmfile v1.x. | ||||||
|  | * `HELMFILE_CACHE_HOME` - specify directory to store cached files for remote operations | ||||||
|  | 
 | ||||||
| ## CLI Reference | ## CLI Reference | ||||||
| 
 | 
 | ||||||
| ``` | ``` | ||||||
|  | @ -540,7 +555,7 @@ Flags: | ||||||
|       --disable-force-update            do not force helm repos to update when executing "helm repo add" |       --disable-force-update            do not force helm repos to update when executing "helm repo add" | ||||||
|       --enable-live-output              Show live output from the Helm binary Stdout/Stderr into Helmfile own Stdout/Stderr. |       --enable-live-output              Show live output from the Helm binary Stdout/Stderr into Helmfile own Stdout/Stderr. | ||||||
|                                         It only applies for the Helm CLI commands, Stdout/Stderr for Hooks are still displayed only when it's execution finishes. |                                         It only applies for the Helm CLI commands, Stdout/Stderr for Hooks are still displayed only when it's execution finishes. | ||||||
|   -e, --environment string              specify the environment name. defaults to "default" |   -e, --environment string              specify the environment name. Overrides "HELMFILE_ENVIRONMENT" OS environment variable when specified. defaults to "default" | ||||||
|   -f, --file helmfile.yaml              load config from file or directory. defaults to helmfile.yaml or `helmfile.yaml.gotmpl` or `helmfile.d`(means `helmfile.d/*.yaml` or `helmfile.d/*.yaml.gotmpl`) in this preference. Specify - to load the config from the standard input. |   -f, --file helmfile.yaml              load config from file or directory. defaults to helmfile.yaml or `helmfile.yaml.gotmpl` or `helmfile.d`(means `helmfile.d/*.yaml` or `helmfile.d/*.yaml.gotmpl`) in this preference. Specify - to load the config from the standard input. | ||||||
|   -b, --helm-binary string              Path to the helm binary (default "helm") |   -b, --helm-binary string              Path to the helm binary (default "helm") | ||||||
|   -h, --help                            help for helmfile |   -h, --help                            help for helmfile | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue